Hi, sorry it's taken so long for me to respond.
I was able to replicate your difficulty on this end of things, and
what I've found is that the Sonatype document is incorrect about
these two being interchangeable. They _should_ be, but are not...at
least, not in the 2.0.x releases. I would have sworn that we had a
test for this at one point, and I'm pretty sure it worked
before...but I've tried back to 2.0.4, and had no luck. One thing I
will say is that it works just fine in maven 2.1-snapshot (the
current trunk), but I know that without at least an alpha release,
this is just an academic point.
If you feel like doing it, can you make sure this is captured in a
JIRA issue? If you don't have time, I can add it myself. I'll also
look at correcting (or at least footnoting) the Sonatype document.
Thanks,
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