Why puppet is not able to download latest from snapshot repo
We are using Puppet and mCollective for our server deployments. For both of our dev and test environments, we release the artifacts (from two different branches) to the same nexus snapshot repo (we use maven
classifier to distinguish between dev and test artifacts). The artifact details look like:
<groupId>my.group</groupId> <artifactId>my-app</artifactId> <version>1.0-SNAPSHOT</version> <classifier>dev</classifier>
<groupId>my.group</groupId> <artifactId>my-app</artifactId> <version>1.0-SNAPSHOT</version> <classifier>test</classifier>
These artifacts are released through two Jenkins jobs. For Puppet/mCollective we use
LATEST as the version; however, for some reason it ignores the classifier while determining the latest. What I meant was, lets assume in nexus snapshot repo dev artifact was created at
21-July-2015 1PM GMT and test artifact was created at
21-July-2015 2PM GMT. On server, if we want to do a dev deploy, mCollective agent downloads the test artifact from nexus repo (even after we provide the classifier as
dev in puppet configuration).
I see a script
download-artifact-from-nexus.sh which I believe is used to download the artifact from nexus repo. This script uses Nexus REST APIs to download the artifact. I am not aware of these REST APIs, but I feel this script does not use
maven-metadata.xml which clearly mentions which artifact is latest based on classifier. I am new to puppet/mCollective and not sure how to resolve this. Appreciate if somebody can provide some help.