我想解决jboss-eap-quickstarts项目的依赖项。我用maven3
:
/usr/share/maven3/apache-maven-3.3.9/bin/mvn clean install
我收到了例外:
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Failure to find org.jboss.bom:jboss-javaee-6.0-with-tools:pom:1.0.4.Final-redhat-9 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ line 76, column 25
[ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 92, column 21
[ERROR] 'dependencies.dependency.version' for org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar is missing. @ line 99, column 21
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @ line 133, column 21
[ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @ line 141, column 21
[ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar is missing. @ line 148, column 21
[ERROR] Non-resolvable import POM: Failure to find org.jboss.spec:jboss-javaee-6.0:pom:3.0.2.Final-redhat-4 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ line 69, column 22
[ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 82, column 19
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar is missing. @ line 90, column 19
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar is missing. @ line 97, column 19
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar is missing. @ line 104, column 20
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar is missing. @ line 111, column 20
[ERROR] 'dependencies.dependency.version' for org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar is missing. @ line 118, column 19
[ERROR] Non-resolvable import POM: Failure to find org.jboss.spec:jboss-javaee-6.0:pom:3.0.2.Final-redhat-4 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ line 68, column 25
//etc
maven central中缺少指定的依赖项。
问题:我应该调查另一件神器吗?
项目的readme
中未提及。
答案 0 :(得分:1)
您应该在pom.xml
文件中添加以下存储库:
<repositories>
<repository>
<id>jboss-developer-staging-repository</id>
<url>http://jboss-developer.github.io/temp-maven-repo/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jboss-enterprise-maven-repository</id>
<url>https://maven.repository.redhat.com/ga/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-developer-staging-repository</id>
<url>http://jboss-developer.github.io/temp-maven-repo/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>jboss-enterprise-maven-repository</id>
<url>https://maven.repository.redhat.com/ga/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
尤其是第二个https://maven.repository.redhat.com/ga/
,包含您要查找的依赖项,例如jboss-javaee-6.0-with-tools
,1.0.4.Final-redhat-9
已归类pom
。
这在7.1
开发分支的pom.xml
中有所描述。但是,没有6.1.1
分支,6.2.x
确实没有指定任何存储库,而是设置了local repository。