1

I'm trying to implement a continuous deployment system and I seem to not be able to find a good answer for our problem. We use Jenkins to run a maven build to generate our artifacts and deploy them to Nexus. I see a few projects that bundle up everything into a single war or tar file, extract one file per request from Nexus by name and deploy it to an application server, but this requires them to know beforehand what versions they have available. My project has quite a few jars/wars/binaries among other artifacts, which don't get deployed using an application server. What we want to do is be able to do is pull any snapshot or release revision of the software out of nexus and either generate an install package or deliver it directly to a remote server.

Clarification: I want QA or development to be able to select a version from Jenkins; where Jenkins will poll Nexus for the available versions, then perform an automated deploy to a server from Nexus.

Is there an easy nexus/maven way to get software out to a testing system?

So, is there a way to poll nexus to determine what revisions are available through ant/ivy, Jenkins, maven, gradle? I'll write in something else if it helps.

I see that a similar question was asked here: How do I choose an artifact from Nexus in a Hudson / Jenkins job?, but it is as of yet unanswered 9 months later.

Community
  • 1
  • 1
user1442498
  • 305
  • 2
  • 10
  • possible duplicate of [How do I choose an artifact from Nexus in a Hudson / Jenkins job?](http://stackoverflow.com/questions/7737634/how-do-i-choose-an-artifact-from-nexus-in-a-hudson-jenkins-job) – Mark O'Connor Jul 12 '12 at 20:38
  • Alternatively, you might consider using Jenkins for builds, nexus for storage, and a third tool for deployments. – EricMinick Jul 16 '12 at 17:41

1 Answers1

0

Nexus gives you a standard HTTP browsing capability. You could browse the repository through HTTP and see what is available.

I still don't understand your Use Case though. If you know which versions of the project you want then what is the problem?

The easiest would be to write an installer pom.xml that has in it a ${} placeholder for the version you want for the artifacts then invoke mvn with mvn package -Dproduct.version=1.0.0

If you use a container, PAX has plugins that allow you to specific artifacts like mvn:myGroup/myArtifact/myVersion and it will auto pull from Maven.

Nexus isn't doing any magic. It's all well known paths on a URL of groups/artifactId/versions

Andrew T Finnell
  • 13,417
  • 3
  • 33
  • 49
  • I probably should have stated that Maven doesn't actually manage the entire project. So the dependencies for all of the java files are setup in maven, but all of the c++ and configuration are managed through a different build system. Wouldn't running mvn package mean I would have to create a new dependency set that includes all of my packages from both systems? – user1442498 Jul 11 '12 at 22:23
  • I ended up just generating the full install package with maven and uploading it as an artifact into Nexus. On jenkins, the job that performs the package build parses the nexus install package url to pull all the available packages as options for QA/dev to perform a deployment. Then I wrote a custom deployer to pull the correct package with wget. – user1442498 Jul 16 '12 at 20:33