Compilation and execution

2007-03-02 Thread Emmanuel Hugonnet

Hi,
I have to compile with a different JDK in my tests from the one to 
compile my code.

I know about the codehaus wiki page ;o)
My project is a multi module project.
In some modules I need to use a jdk  1.5 to compile the sources and the 
tests,
in some I compile the sources in 1.4 and the tests in 1.5 and last but 
not least in

the modules left I compile sources and tests in 1.4.
So I tried to put a default configuration in my project parent POM, for 
example to excludes package-info.java, etc.

Then I defined 2 executions like this (depending on my module) :
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
  executions
 execution
   idsource-compiler/id
   phasecompile/phase
   goals
 goalcompile/goal
   /goals--
   configuration
 source1.4/source
 target1.4/target
 compilerArguments
   verbose /
   
bootclasspath${settings.localRepository}/com/sun/rt/1.4.2_13/rt-1.4.2_13.jar:${java.home}/lib/jsse.jar:${java.home}/lib/jce.jar/bootclasspath

 /compilerArguments
   /configuration
/execution
 execution
   idtest-compiler/id
   phaseprocess-test-sources/phase
   goals
 goaltestCompile/goal
   /goals
   configuration
 source1.5/source
 target1.5/target
   /configuration
 /execution
   /executions
   dependencies
 dependency
   groupIdcom.sun/groupId
   artifactIdrt/artifactId
   version1.4.2_13/version
 /dependency   
   /dependencies

 /plugin
But when I run a clean install the source-compiler execution 
configuration is not used to compile the sources while the tests are 
correctly compiled using the test-compiler configuration.

Can somebody explain this to me ?
Why is execution configuration not used on the compile phase ?
Thanks

Emmanuel

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



Re: Compilation and execution

2007-03-02 Thread Emmanuel Hugonnet

zze-HUGONNET E ext RD-BIZZ a écrit :

Hi,
I have to compile with a different JDK in my tests from the one to 
compile my code.

I know about the codehaus wiki page ;o)
My project is a multi module project.
In some modules I need to use a jdk  1.5 to compile the sources and 
the tests,
in some I compile the sources in 1.4 and the tests in 1.5 and last but 
not least in

the modules left I compile sources and tests in 1.4.
So I tried to put a default configuration in my project parent POM, 
for example to excludes package-info.java, etc.

Then I defined 2 executions like this (depending on my module) :
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
  executions
 execution
   idsource-compiler/id
   phasecompile/phase
   goals
 goalcompile/goal
   /goals--
   configuration
 source1.4/source
 target1.4/target
 compilerArguments
   verbose /
   
bootclasspath${settings.localRepository}/com/sun/rt/1.4.2_13/rt-1.4.2_13.jar:${java.home}/lib/jsse.jar:${java.home}/lib/jce.jar/bootclasspath 


 /compilerArguments
   /configuration
/execution
 execution
   idtest-compiler/id
   phaseprocess-test-sources/phase
   goals
 goaltestCompile/goal
   /goals
   configuration
 source1.5/source
 target1.5/target
   /configuration
 /execution
   /executions
   dependencies
 dependency
   groupIdcom.sun/groupId
   artifactIdrt/artifactId
   version1.4.2_13/version
 /dependency  /dependencies
 /plugin
But when I run a clean install the source-compiler execution 
configuration is not used to compile the sources while the tests are 
correctly compiled using the test-compiler configuration.

Can somebody explain this to me ?
Why is execution configuration not used on the compile phase ?
Thanks

Emmanuel

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



Ok I understand my error :
The compilation in execution is run after the compilation of the compile 
phase. Since i the code as already been compiled, it is not recompiled. 
that 's why the tests compilation is done on phase process-test-sources 
and not on test.

Emmanuel

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