Could not find artifact when deploying artifact to Nexus

Viewed 289

I am deploying an artifact to a Nexus snapshot repository that allows redeployment, using the maven command:

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

1 Answers

Hope your hostname & path is correct . if so try below things-

you should try adding below if behind proxy in settings.xml ( ~/.m2/ directory)

<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. so try that as well

Related