2
votes

My current Jenkins deployment job retrieves war file generated from maven build process from Nexus repository. The deployment is done this way since I can not use hot deployment for my environments. Currently I used parameterized build with Jenkins so I can manually enter the version number for my artifact. Is there a way to configure Maven or Nexus so the artifact generate from the latest trunk build can be accessed from an static URL? For example:

http://mynexus:8081/nexus/content/repository/snapshots/com/somepackage/my-app/trunk/my-app-trunk.war
2

2 Answers

1
votes

I don't know a way to do this in Nexus. But you can access the latest successful build from Jenkins, with a URL like this: http://localhost:8080/jenkins/job/jobname/lastSuccessfulBuild/my-app-trunk.war

You have to enable artifact archiving for your war file, then you can access it.

1
votes

Same issue here, we discovered about :

https://wiki.jenkins-ci.org/display/JENKINS/Maven+Deployment+Linker

Which does the job.

Hope that helps.