1
votes

The quickstart will build using maven locally but when you push to openshift, the dependencies are not being resolved. The dependencies of type pom do not seem to be in the nexus repository openshift is using. It will be a pain but I could try put the dependencies in from the dependent poms but I was hoping of a better way.

Has anybody encountered this problem and have a better solution? Is there a repository url that I am missing?

EDIT: The quickstart in question is under https://github.com/jboss-developer/jboss-wfk-quickstarts/tree/2.6.0.Final

Stopping RockMongo cartridge MongoDB already stopped Stopping jbossas cartridge Repairing links for 1 deployments Building git ref 'master', commit 49dfdc8 Found pom.xml... attempting to build with 'mvn -e clean package -Popenshift -DskipTests' Apache Maven 3.0.4 (r1232336; 2012-12-18 14:36:37-0500) Maven home: /usr/share/java/apache-maven-3.0.4 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65/jre Default locale: en_US, platform encoding: ANSI_X3.4-1968 OS name: "linux", version: "2.6.32-431.23.3.el6.x86_64", arch: "i386", family: "unix" [INFO] Scanning for projects... Downloading: http://mirror.ops.rhcloud.com/nexus/content/groups/public/org/jboss/bom/wfk/jboss-javaee-6.0-with-tools/2.6.0-redhat-1/jboss-javaee-6.0-with-tools-2.6.0-redhat-1.pom

Downloading: http://mirror.ops.rhcloud.com/nexus/content/groups/public/org/jboss/bom/eap/jboss-javaee-6.0-with-hibernate/6.2.3.GA/jboss-javaee-6.0-with-hibernate-6.2.3.GA.pom

[ERROR] The build could not read 1 project -> [Help 1] [ERROR]

[ERROR] The project desda:desda:1.0 (/var/lib/openshift/53e568515973ca7d460003bc/app-root/runtime/repo/pom.xml) has 13 errors

[ERROR] Non-resolvable import POM: Could not find artifact org.jboss.bom.wfk:jboss-javaee-6.0-with-tools:pom:2.6.0-redhat-1 in nexus (http://mirror.ops.rhcloud.com/nexus/content/groups/public) @ line 70, column 16 -> [Help 2]

[ERROR] Non-resolvable import POM: Could not find artifact org.jboss.bom.eap:jboss-javaee-6.0-with-hibernate:pom:6.2.3.GA in nexus (http://mirror.ops.rhcloud.com/nexus/content/groups/public) @ line 77, column 16 -> [Help 2]

[ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 94, column 15

[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar is missing. @ line 102, column 15

[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_1.1_spec:jar is missing. @ line 110, column 15

[ERROR] 'dependencies.dependency.version' for org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar is missing. @ line 118, column 15

[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar is missing. @ line 126, column 15

[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-validator:jar is missing. @ line 135, column 15

[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-jpamodelgen:jar is missing. @ line 151, column 15

[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-validator-annotation-processor:jar is missing. @ line 159, column 15

[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @ line 166, column 15

[ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @ line 175, column 15

[ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar is missing. @ line 181, column 15

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException An error occurred executing 'gear postreceive' (exit code: 1)

Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/openshift/53e568515973ca7d460003bc/jbossas

For more details about the problem, try running the command again with the '--trace' option.

1

1 Answers

2
votes
    Just in case anybody else is as clueless in maven as I am!!
    You need to add the following to the pom.xml
    <repositories>
            <repository>
                <id>jboss-ga-repository</id>
                <url>http://maven.repository.redhat.com/techpreview/all</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>jboss-ga-plugin-repository</id>
                <url>http://maven.repository.redhat.com/techpreview/all</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>

Also add this dependency in dependencies section

<dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-all-6.0</artifactId>
            <version>3.0.0.Final</version>
        </dependency>