Reputation: 60768
Hitting a bit of a roadblock when trying to download a snapshot jar with dependencies. Normally Nexus' REST API expands the "SNAPSHOT" into the correct date time stamp for you - however if downloading a jar with dependencies the text -jar-with-dependencies
follows the date substituted in by SNAPSHOT
. It's not clear to me how to communicate this unusual name situation to Nexus' REST API - has anyone encountered/worked around this?
Upvotes: 2
Views: 1149
Reputation: 7519
You have to specify the classifier parameter. That bit after the version number, and prior to the extension, is always the classifier. The classifier is the 4th maven coordinate and it is used to distinguish between various "attached" artifacts. An attached artifact is anything other than the primary artifact built by the maven project, typically a jar file.
The most often seen example is:
myArtifact-1.0.0.jar
myArtifact-1.0.0-sources.jar
Where the source files for the java are found in the second jar. In your case, the jar-with-dependencies
is the name of the maven assembly that builds a jar with all of its dependencies.
Upvotes: 0
Reputation: 60768
Looking at the artifact in Nexus revealed that its coordinates included a
<classifier>jar-with-dependencies</classifier>
Field. Lo and behold this snaps into the REST API correctly: http://yourdomain.com:8081/nexus/nexus-rrb-plugin/default/docs/index.html
Upvotes: 1