Realistically, you should set the JAVA_HOME in Windows Control Panel
etc so it is set to 1.5.0_11 permanently for all apps. Then you can
set compiler configuration parameters in your pom to target/source a
different Java version as needed.

Alternatively, you can edit the mvn.bat file and set your JAVA_HOME
there. Set it near the top as the value is checked at some point and
fails if it is not set.

Finally, you can check the documentation for maven-compiler-plugin if
you really want to set up multiple compilers in your project for some
reason (this is generally not done, and not advised unless you have a
specific need for a complicated configuration).

Wayne

On 5/31/07, Tawfik, Sameh E <[EMAIL PROTECTED]> wrote:

Hi,

I'm using Maven version: 2.0.6, and I've different versions of java sdk
installed on my machine.

Currently on my WindowsXP, JAVA_HOME is set to C:\j2sdk1.4.2_13,  but
when I run maven I need to have JAVA_HOME set to C:\Program
Files\Java\jdk1.5.0_11 instead.

I can reset the value of JAVA_HOME variable to the needed value and that
will work fine when I run maven, but is there a way where I can override
the default value from inside the pom file?

Could anyone let me know if this step can be accomplished?

 Thanks,

   Sameh
This email and any files transmitted with it are confidential, proprietary
and intended solely for the individual or entity to whom they are addressed.
If you have received this email in error please delete it immediately.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to