Veerman, Christiaan a écrit :
If the JAVA_HOME = C:\svn\jdk1.5.0_06\bin\javac.exe; changing the target of a
jdk via source and target to '1.4', how does one resolve the physical location
of the jdk?
it will use the 1.5 compiler but will compile for 1.4 jdk.
compilerVersion isn't necessary.
This does NOT work as I need to use the 1.4 compiler.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerVersion>1.4</compilerVersion>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
</plugins>
I was thinking about using a custom compiler:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<executable>C:\svn\jdk1.4_02\bin\javac.exe</executable>
<compilerVersion>1.4</compilerVersion>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
</plugins>
This is pretty ugly especially if it resides in every pom as I don't really
control the env JAVA_HOME var that is launched with continuum.
I'm looking for a better impl. Please advise.
An other possibility is to declare two profiles in a parent pom of your project, and you activate
one of them in build definition with '-P' mvn argument
http://maven.apache.org/guides/introduction/introduction-to-profiles.html
Emmanuel
Christiaan
-----Original Message-----
From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 09, 2006 12:00 PM
To: [email protected]
Subject: Re: Best Practice: JDK target for continuum and maven
Actually, projects can only use the same jdk than Continuum. In 1.1, you'll
choose a different jdk for project with continuum profiles.
Workarounds:
1- you can define source and target arguments in compiler plugin configuration
for your projects
2- you can use forkmode on compile and test plugins
Emmanuel
Veerman, Christiaan a écrit :
I am requesting some input in regards to targetting a specific JAVA
compiler in Continuum for a specific continuum (maven) project.
Christiaan
****DISCLAIMER
The information contained in this e-mail and attachments, if any, is
confidential and may be subject to legal privilege. If you are not
the intended recipient, you must not use, copy, distribute or disclose
the e-mail and its attachment, or any part of its content or take any
action in reliance of it. If you have received this e-mail in error,
please e-mail the message back to the sender by replying and then
deleting it. We cannot accept responsibility for loss or damage
arising from the use of this e-mail or attachments, and recommend that
you subject these to your virus checking procedures prior to use
****DISCLAIMER
The information contained in this e-mail and attachments, if any, is
confidential and may be subject to legal privilege. If you are not the
intended recipient, you must not use, copy, distribute or disclose the e-mail
and its attachment, or any part of its content or take any action in reliance
of it. If you have received this e-mail in error, please e-mail the message
back to the sender by replying and then deleting it. We cannot accept
responsibility for loss or damage arising from the use of this e-mail or
attachments, and recommend that you subject these to your virus checking
procedures prior to use