Specify JDK for Maven to use

Posted by DanInDC on Stack Overflow See other posts from Stack Overflow or by DanInDC
Published on 2010-03-23T21:11:46Z Indexed on 2010/03/23 21:13 UTC
Read the original article Hit count: 487

Filed under:
|
|
|
|

Hi all. I am trying to build a Hudson plugin I've modified and it requires jdk1.6. This is fine, but I don't see how I can tell maven where the different jdk is. I've found few mentions on the internet but they don't seem to apply to me. Some suggest adding some config to .m2/settings.xml but I don't have a settings.xml. Plus, I don't want to use 1.6 for all maven builds.

One kink is I am using mvn in cygwin, if that matters at all. It appears I should be able to make the specification in the project pom file, but the existing pom is pretty bare.

So bottom line is, is there a way to specify a jdk for a single invocation of maven?

© Stack Overflow or respective owner

Related posts about maven

Related posts about jdk