Milos Kleint wrote:
>
> well, I suppose the question was if configuring just the testCompile
> execution doesn't work.
> I suppose having a general config at sourcelevel 1.4 and then specific
> one for testCompile execution shall work.
>
I've the same problem and I've tried this way too, but it seems it doesnt
work.
I've reduced it in a very simple pom with something like this
(for example to configure compiler version 1.4 as default but 1.5 for test
compile):
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerVersion>1.4</compilerVersion>
</configuration>
<executions>
<execution>
<id>xxx</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<compilerVersion>1.5</compilerVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
if I try a clean test -X I see in the log that the general configuration is
used and the one in the execution is simply ignored:
[DEBUG] (f) compilerVersion = 1.4
...
[DEBUG] -- end configuration --
[INFO] [compiler:compile]
[DEBUG] (f) compilerVersion = 1.4
[DEBUG] -- end configuration --
[INFO] [compiler:testCompile]
I've a more complex situation in real projects where I need to configure the
compilation for integration tests with a java 1.5 compiler keeping the 1.4
for the application sources, but I'm not able to do (same problem).
Is there something wrong with my configuration or it is a bug?
Attached is the sample pom which I used for the test.
http://www.nabble.com/file/p20379248/foo-pom.zip foo-pom.zip
--
View this message in context:
http://www.nabble.com/compiler-plugin%3A-separate-test-compiler-configuration-tp20058021p20379248.html
Sent from the Maven Developers mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]