【问题标题】:Non-resolvable import POM Could not find artifact in nexus不可解析的导入 POM 无法在 nexus 中找到工件
【发布时间】:2018-02-10 19:04:24
【问题描述】:

这是我在通过从 Gogs 中提取 maven 项目进行 Jenkins 构建时遇到的错误。我也在使用 Nexus 存储库。 Jenkins、Nexus 等都作为 Docker 容器运行。

[ERROR] Non-resolvable import POM: Could not find artifact org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-bom:pom:2.0.0 in nexus (http://nexus:8081/repository/maven-all-public/) @ org.jboss.bom.eap:jboss-javaee-6.0-with-tools:[unknown-version], /home/jenkins/.m2/repository/org/jboss/bom/eap/jboss-javaee-6.0-with-tools/6.4.0.GA/jboss-javaee-6.0-with-tools-6.4.0.GA.pom, line 55, column 25

[ERROR] Non-resolvable import POM: Could not find artifact org.jboss.arquillian:arquillian-bom:pom:1.1.0.Final in nexus (http://nexus:8081/repository/maven-all-public/) @ org.jboss.bom.eap:jboss-javaee-6.0-with-tools:[unknown-version], /home/jenkins/.m2/repository/org/jboss/bom/eap/jboss-javaee-6.0-with-tools/6.4.0.GA/jboss-javaee-6.0-with-tools-6.4.0.GA.pom, line 64, column 25

[ERROR] Non-resolvable import POM: Could not find artifact org.jboss.arquillian.extension:arquillian-drone-bom:pom:1.1.1.Final in nexus (http://nexus:8081/repository/maven-all-public/) @ org.jboss.bom.eap:jboss-javaee-6.0-with-tools:[unknown-version], /home/jenkins/.m2/repository/org/jboss/bom/eap/jboss-javaee-6.0-with-tools/6.4.0.GA/jboss-javaee-6.0-with-tools-6.4.0.GA.pom, line 74, column 25

[ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 87, column 21
[ERROR] 'dependencies.dependency.version' for org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar is missing. @ line 94, column 21
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_1.1_spec:jar is missing. @ line 101, column 21
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar is missing. @ line 114, column 21
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @ line 121, column 21
[ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @ line 127, column 21
[ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar is missing. @ line 133, column 21

我正在研究Openshift CD Demo,它使用此Openshift Tasks repo code 进行构建。

下面是错误图片

【问题讨论】:

    标签: maven jenkins openshift jenkins-pipeline nexus


    【解决方案1】:

    错误信息说

    Could not find artifact org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-bom:pom:2.0.0 in nexus (http://nexus:8081/repository/maven-all-public/)
    

    这意味着提到的工件可能不存在于所述 Nexus 存储库中。

    【讨论】:

    • 那么我应该手动将它添加到 Nexus 吗?没有上传选项,我试过cURL(curl -v -u deployment:deployment123 --upload-file shrinkwrap-resolver-bom-2.0.0.pom.xml http://nexus-cicd-developer.192.168.99.100.nip.io/#browse/browse/assets:maven-all-public)上传,它说这个网址不支持HTTP/1.1 405 HTTP方法PUT
    • 使用maven在nexus上传文件,使用maven POM nexus addin就可以在nexus上传artifacts
    • 好的,我会尝试,但我有一个疑问。如果您看到错误图像,它下载了前 4 个 jars/poms。那么为什么它会因 shrinkwrap-resolver-bom-2.0.0.pom 而失败?我是 nexus 的新手并试图理解它。
    • @JohnSeen 实际上,我会尝试找到包含正确工件的 Nexus 存储库(在网络上),然后将其添加到 settings.xml 或在公司 nexus 中代理它。
    • Jboss 工件可以在这里找到:repository.jboss.org ... 将代理存储库添加到 Nexus。
    猜你喜欢
    • 1970-01-01
    • 2019-02-06
    • 2012-07-25
    • 2020-01-15
    • 2014-12-12
    • 2013-01-25
    • 2011-08-07
    • 2020-03-20
    • 2020-08-18
    相关资源
    最近更新 更多