We are using Maven 2.2.1 and Jenkins. We have some 300-400 modules. A few months ago, we finalized the migration from Ant to Maven and at that time the goal was to make sure things built properly under Maven 2.2.1, as we weren’t still willing to move directly to Maven 3.0.x. Yeah, we knew that Maven was relatively stable, but due to the effort required in migrating all of the modules and assemblies (from Ant), we chose to stick with a well-known stable version such as 2.2.1.
In order to make a list of the modules which are not fully compliant with Maven 3.x, I would like to schedule the Jenkins jobs (that currently run them using Maven 2.2.1) to build them using 3.0.4 at a scheduled time during the night. How can I do this?
Thanks in advance!
Martin
This is a screaming hack, but should work. As it is a hack, I am going to leave figuring out the exact details to you 😉
You need to set up two jobs to fence the maven 3 jobs.
Both jobs will need the Groovy Plugin in order to add a build step.
You will set up three versions of Maven in the System configuration.
The first job will access the global configuration and change
Maven 2.2.1 by day 3.0.4 by nightto point to the same path asMaven 3.0.4. The second job will switch it back.The code will need to be something like
Note I have not checked the above for syntax, but it should be close enough to get you sorted.
The reverse job should be trivially easy