No change John, 'compile' MOJO gets properly configured 'testCompile' does
not. Out of interest I notice that, unlike the 'compile' MOJO the
'testCompile' MOJO execution does not get postfixed with the execution id:-
...
[DEBUG] (f) target = 1.5
[DEBUG] (f) verbose = false
[DEBUG] -- end configuration --
[INFO] [compiler:compile {execution: default}]
[DEBUG] Using compiler 'javac'.
[DEBUG] Source directories:
[D:\APT\projects\apt-metrics\apt-metrics-common\src\main\java]
....
-versus-
[DEBUG] (f) showWarnings = false
[DEBUG] (f) staleMillis = 0
[DEBUG] (f) verbose = false
[DEBUG] -- end configuration --
[INFO] [compiler:testCompile]
[DEBUG] Using compiler 'javac'.
[DEBUG] Source directories:
[D:\APT\projects\apt-metrics\apt-metrics-common\src\test\java]
This was produced from a plugin configuration thus:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<id>default</id>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</execution>
</executions>
</plugin>
Note, it does not seem to matter whether the configuration is attempted in
the <pluginsManagement> area or the <plugins> area.
cheers - John
John Casey-5 wrote:
>
> Out of curiosity, does it make any difference if you specify
> <id>default</id> in the plugin execution? It really shouldn't, but
> those id's are used as a basis for merging configurations, so if it
> were grabbing the wrong default value (or none at all), then merging
> your plugin configuration with something given in, say, the super-pom
> might get derailed...
>
> I'll take a closer look at this, but it's something to check quickly...
>
> -john
>
>
> On Jul 9, 2007, at 10:08 AM, jallen wrote:
>
>>
>> Hi all,
>>
>> As per the rather excellent guide available at Sonatypes website
>> (http://www.sonatype.com/book/using-plugins.html#configuring_plugins):
>>
>> One is told that the following two compiler plugin configurations are
>> synonymous:
>>
>> <project>
>> ...
>> <build>
>> <plugins>
>> <plugin>
>> <artifactId>maven-compiler-plugin</artifactId>
>> <configuration>
>> <source>1.4</source>
>> <target>1.4</target>
>> </configuration>
>> </plugin>
>>
>> ..
>>
>> and
>>
>>
>> <project>
>> ...
>> <build>
>> <plugins>
>> <plugin>
>> <artifactId>maven-compiler-plugin</artifactId>
>> <executions>
>> <execution>
>> <goals>
>> <goal>compile</goal>
>> <goal>testCompile</goal>
>> </goals>
>> <configuration>
>> <source>1.4</source>
>> <target>1.4</target>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>>
>> However from a number of trials using compiler plugin version 2.0.2
>> and
>> maven 2.0.7 we have been unable to get this to work.
>>
>> The global style plugin configuration works, with both Mojos
>> getting the
>> correct configuration.
>> The Goal set based configuration properly configures the 'compile'
>> goal but
>> does not configure the 'testCompile' goal.
>>
>> Varying where the testCompile goal is specified makes no difference.
>>
>> Are we correct in thinking that, as per the Sonatype docs, the
>> <goals><goal>compile</goal><goal>testCompiler</goal></goals> should
>> work and
>> result in both compile and testCompiler MOJOs being properly
>> configured?
>>
>> Thanks,
>>
>> John
>> --
>> View this message in context: http://www.nabble.com/Plugin-
>> configuration-for-specific-goals---doc-error--
>> tf4049555s177.html#a11502449
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
> ---
> John Casey
> Committer and PMC Member, Apache Maven
> mail: jdcasey at commonjava dot org
> blog: http://www.ejlife.net/blogs/john
>
>
>
>
--
View this message in context:
http://www.nabble.com/Plugin-configuration-for-specific-goals---doc-error--tf4049555s177.html#a11504591
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]