Ya, I will look into it more...

Though, I found found this a little odd/interesting:

----8<----
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:// maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>

    <modelVersion>4.0.0</modelVersion>

    <groupId>test</groupId>
    <artifactId>test</artifactId>
    <name>test</name>
    <packaging>pom</packaging>

    <version>1.0</version>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <configuration>
                            <tasks>
                                <echo>Hi from parent</echo>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <configuration>
                            <tasks>
                                <echo>Hi from parent (compile)</echo>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
---->8----

<snip>
$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------ ----
[INFO] Building test
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------ ----
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
     [echo] Hi from parent
[INFO] Executed tasks
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
     [echo] Hi from parent
[INFO] Executed tasks
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing /Users/jason/ws/maven/test/pom.xml to /Users/ jason/.m2/repository/test/test/1.0/test-1.0.pom [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Feb 15 07:21:18 PST 2007
[INFO] Final Memory: 5M/9M
[INFO] ------------------------------------------------------------------------
</snip>

Runs the plugin's execution bound to validate twice... when I'd expect it to either just work and execute the validate's then compile's executions, or execute just one of them (which was previous behavior I believe), or complain that a plugin was defined twice.

--jason



On Feb 15, 2007, at 7:07 AM, Richard van der Hoff wrote:

Jason van Zyl wrote:
On 15 Feb 07, at 9:32 AM 15 Feb 07, Jason Dillon wrote:
This does not appear to be fixed in 2.0.5... I'm still seeing duplicate plugin executions when parent and child both define executions of a plugin :-(

If you augment or create an issue with a test project (and yes, the hard part is making the test project that stands alone) then we can put it in for the next round of releases.

There's a testcase in the patch on MNG-2297, no?

And I thought this had gone into 2.0.5... It's possible there's another bug lurking somewhere. Jason D, Can you try out the testcase in http://jira.codehaus.org/secure/attachment/20899/maven- project-plugins.patch?

PS: Richards changes work well, hope this is will be
activated with 2.05

I hoped so too...

Cheers

Richard


--
Richard van der Hoff <[EMAIL PROTECTED]>
Telephony Gateways Project Manager
Tel: +44 (0) 845 666 7778
http://www.mxtelecom.com

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



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

Reply via email to