you could think about using this
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<executable><!-- path-to-javac --></executable>
<compilerVersion>1.3</compilerVersion>
</configuration>
</plugin>
Hope this helps
Max
On 1/23/07, Roald Bankras <[EMAIL PROTECTED]> wrote:
Hi
On the 'introduction-to-profiles' page it is stated that ' one of the
goals in maven 2 is to consolidate all the information needed to run a build
into a single file, or file hierarchy which is the POM". To my surprise
however, it is rather difficult to configure a specific JDK (i.e.
JAVA_HOME) for a project.
My situation is as follows. I have multiple projects using version 1.4,
1.5 and 1.6 JDKs. I've already configured the compiler plugin to use the
right source and target options. However, what I would like to do is to
point the compiler to a specific JAVA_HOME environment from the
settings.xml.
I suppose this should be possible by using profiles, however activating
the correct profile is a problem for me.
My final option is to force every developer to first set the correct
JAVA_HOME as a system environment. Which I would have to configure on the
buildserver as well (somehow). This however is error prone. Therefore, I
hope that some of you have a much more flexible sollution.
thx. Regards
Roald Bankras
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.6/646 - Release Date: 1/23/2007
3:36 AM