简体   繁体   English

将工件部署到 Nexus 时找不到工件

[英]Could not find artifact when deploying artifact to Nexus

I am deploying an artifact to a Nexus snapshot repository that allows redeployment, using the maven command:我正在使用 maven 命令将工件部署到允许重新部署的 Nexus 快照存储库:

mvn deploy:deploy-file -Durl=https://t-nexus.perque.com/service/repository/t-PASTIS -DrepositoryId=t-nexus.perque-snapshots -DgroupId=com.perque -DartifactId=pastis -Dversion=0.0.1-SNAPSHOT -Dpackaging=war  -Dfile=pastis.war -DgeneratePom=true -e -X

but I have this error:但我有这个错误:

       at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not find artifact com.perque:pastis:war:0.0.1-20200817.082538-1 in t-nexus.perque-snapshots (https://t-nexus.perque.com/service/repo/t-PASTIS)

usin the upload button of the Nexus repo page everything is going well使用 Nexus 存储库页面的上传按钮,一切顺利

Hope your hostname & path is correct.希望您的主机名和路径是正确的。 if so try below things-如果是这样,请尝试以下操作-

you should try adding below if behind proxy in settings.xml ( ~/.m2/ directory)如果在 settings.xml ( ~/.m2/ 目录) 中的代理后面,您应该尝试在下面添加

<proxies>
  <proxy>
    ...
    <nonProxyHosts>yourserver</nonProxyHosts>
  </proxy>
</proxies>

Add server details like below.添加服务器详细信息,如下所示。

<server> <id>xx</id><username>serverUser</username><password>password</password> </server>

also i had similar error for third party jar.. i did set configuration to release instead of snapshot for 3rd party repo.我对第三方 jar 也有类似的错误。我确实将配置设置为发布,而不是为 3rd 方回购快照。 so try that as well所以也试试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM