History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: MNG-1703
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Edwin Punzalan
Reporter: Yann Le Du
Votes: 2
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Maven 2

<pluginManagement><dependencies> is not propagated to child POMs

Created: 29/Nov/05 04:16 AM   Updated: 21/Feb/06 12:17 AM
Component/s: POM
Affects Version/s: 2.0
Fix Version/s: 2.0.3

Time Tracking:
Not Specified

File Attachments: 1. Text File MNG-1703-maven-project.patch (6 kb)

Issue Links:
Duplicate
 

Complexity: Intermediate


 Description  « Hide
<executions> section in <pluginManagement> isn't propagated to child POMs (as <configuration> is).
The workaround is to use <plugins> with <inherited>true</inherited>
Is this on purpose ?

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Edwin Punzalan - 16/Dec/05 02:07 AM
Hi. The patch in MNG-1499 released with 2.0.1 could have fixed this.... I tried it on my machine and found the executions to be inherited.

Can you try using 2.0.1 and see if its fixed?


Yann Le Du - 16/Dec/05 08:03 AM
I tried with a brand new Maven 2.0.1 installation and got the same thing.

What I'm trying to do is to run an Ant script at process-resources phase. Currently, I use the following conf. Moving it to pluginManagement would allow it not to be executed also for the parent.

<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<ant antfile="replace.xml"/>
</tasks>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.6.5</version>
</dependency>
</dependencies>
<inherited>true</inherited>
</plugin>
</plugins>


Edwin Punzalan - 23/Dec/05 02:18 AM
Hmmm... that's odd. can you do a "mvn help:effective-pom" on the child module and see which have been inherited? Mine definitely has the executions inherited.

Edwin Punzalan - 26/Dec/05 07:14 PM
Hi, can you provide some more info on how to reproduce this? Or maybe if there are others who have the same problem under 2.0.1, please do so too. Because I am unable to reproduce the error and would likely close this issue as "Cannot Repoduce". Thanks.

Yann Le Du - 27/Dec/05 03:20 AM
Hi Edwin, sorry, I wanted to post yesterday, but JIRA was down.
You were right, <executions> is inherited. Yet, <dependencies> is not, hence my test failure.
Should I close this issue and create another one for <dependencies> ?

mvn help:effective-pom gives :
~ <pluginManagement>
~ <plugins>
~ <plugin>
~ <artifactId>maven-antrun-plugin</artifactId>
~ <executions>
~ <execution>
~ <phase>process-resources</phase>
~ <goals>
~ <goal>run</goal>
~ </goals>
~ <configuration>
~ <tasks>
~ <ant antfile="replace.xml"></ant>
~ </tasks>
~ </configuration>
~ </execution>
~ </executions>
~ <dependencies>
~ <dependency>
~ <groupId>ant</groupId>
~ <artifactId>ant-nodeps</artifactId>
~ <version>1.6.5</version>
~ </dependency>
~ </dependencies>
~ </plugin>
~ </plugins>
~ </pluginManagement>
~ <plugins>
~ <plugin>
~ <artifactId>maven-antrun-plugin</artifactId>
~ <executions>
~ <execution>
~ <phase>process-resources</phase>
~ <goals>
~ <goal>run</goal>
~ </goals>
~ <configuration>
~ <tasks>
~ <ant antfile="replace.xml"></ant>
~ </tasks>
~ </configuration>
~ </execution>
~ </executions>
~ </plugin>


Brett Porter - 28/Dec/05 06:57 AM
I've updated the subject accordingly.

Grégory Joseph - 28/Dec/05 07:07 AM
then this is duplicate with MNG-1896

Edwin Punzalan - 17/Feb/06 02:41 AM
Attached patch with unit test

I forgot that this is still assigned to me _