You can do this using the Maven Compiler plugin. See
http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html.
Eric
On 12/28/2012 12:25 PM, Jeff wrote:
I have a brand new Jenkins master + slave running on top of the latest
JDK 1.7.0_u10.
I've configured multiple JDK versions in Jenkins (with auto installers
from Oracle), including JDK 1.6.0_u37.
I have one Maven job that uses the wsgen/wsimport commands to generate
WSDL and client files that works fine when running in JDK 1.6, but
fails with JDK 1.7.
I have set the job to use JDK 1.6, but it still executes the maven
command against the default JDK 1.7.
I thought that by configuring the job with a specific JDK, that is
what it would use, but that doesn't seem to be the case.
How do I force the job (maven command) to run using the correct JDK?
--
Jeff Vincent
[email protected] <mailto:[email protected]>
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox <http://db.tt/9O6LfBX> !!