Your first question is a Maven issue - I could only speculate about it. For the second question - yes, in the Build Environment section of the job configuration you can set environment variables for the job.

Eric

On 12/28/2012 12:51 PM, Jeff wrote:
Won't that will just cause clutter in the POM that will affect every developer and every environment?

Seems like it would be cleaner to just allow me to tell Jenkins to run the job using the correct JDK that was specifically defined in the job.

My questions:

  * Why doesn't job execution honor the JDK setting?
  * Is there a way to force a new value for JAVA_HOME for a specific job?




On Fri, Dec 28, 2012 at 10:40 AM, Eric Pyle <eric.p...@cd-adapco.com <mailto:eric.p...@cd-adapco.com>> wrote:

    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
    predato...@gmail.com <mailto:predato...@gmail.com>
    See my LinkedIn profile at:
    http://www.linkedin.com/in/rjeffreyvincent
    I ♥ DropBox <http://db.tt/9O6LfBX> !!




--
Jeff Vincent
predato...@gmail.com <mailto:predato...@gmail.com>
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox <http://db.tt/9O6LfBX> !!

Reply via email to