You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Lon Binder (JIRA)" <ji...@codehaus.org> on 2011/09/15 00:12:17 UTC

[jira] Created: (MNG-5174) Plugin Configuration from Grandparent Not Executed on Grandchild

Plugin Configuration from Grandparent Not Executed on Grandchild
----------------------------------------------------------------

                 Key: MNG-5174
                 URL: https://jira.codehaus.org/browse/MNG-5174
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Inheritance and Interpolation
    Affects Versions: 3.0.2
         Environment: ava version: 1.6.0_24, vendor: Apple Inc.
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"

            Reporter: Lon Binder
            Priority: Blocker
         Attachments: build.log

Summary: The configuration of a plugin in the grandparent of a project, whether in <plugins> or <pluginManagement> is not properly inherited to grandchild.

To reproduce:
Setup: 
POM C extends POM B; POM B extends POM A

POM A includes:
{code}
...

	<build>		
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.3</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/dependency-libs</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
			
	</build>
...
{code}

Then in the POM C folder execute {{mvn package}}.  The plugin does not work.

If the same configuration is moved or copied to POM B, then the execution in POM C's folder is repeated, it works fine.

The same holds true if the above is moved to POM A's {{<pluginManagement>}} node (and the appropriate {{<plugin>}} groupId and artifactId are added to POM C).  It even holds true if you do this and add additional to POM B.  Unless the full config is in POM B (or POM C) then it will not run from POM C.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-5174) Plugin Configuration from Grandparent Not Executed on Grandchild

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-5174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-5174:
-----------------------------------

    Attachment: MNG-5174.zip

Running {{mvn package -V}} on the attached example project yields:
{noformat}
Apache Maven 3.0.2 (r1056850; 2011-01-09 01:58:10+0100)
Java version: 1.5.0_22, vendor: Sun Microsystems Inc.
Java home: D:\java\jdk-1.5\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.3:copy-dependencies (copy-dependencies) @ test ---
[INFO] junit-3.8.2.jar already exists in destination.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.565s
[INFO] Finished at: Thu Sep 15 15:08:16 CEST 2011
[INFO] Final Memory: 9M/157M
[INFO] ------------------------------------------------------------------------
{noformat}
i.e. the issue cannot be reproduced from the provided information.

> Plugin Configuration from Grandparent Not Executed on Grandchild
> ----------------------------------------------------------------
>
>                 Key: MNG-5174
>                 URL: https://jira.codehaus.org/browse/MNG-5174
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 3.0.2
>         Environment: ava version: 1.6.0_24, vendor: Apple Inc.
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"
>            Reporter: Lon Binder
>            Priority: Blocker
>         Attachments: build.log, MNG-5174.zip
>
>
> Summary: The configuration of a plugin in the grandparent of a project, whether in <plugins> or <pluginManagement> is not properly inherited to grandchild.
> To reproduce:
> Setup: 
> POM C extends POM B; POM B extends POM A
> POM A includes:
> {code}
> ...
> 	<build>		
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-dependency-plugin</artifactId>
> 				<version>2.3</version>
> 				<executions>
> 					<execution>
> 						<id>copy-dependencies</id>
> 						<phase>package</phase>
> 						<goals>
> 							<goal>copy-dependencies</goal>
> 						</goals>
> 						<configuration>
> 							<outputDirectory>${project.build.directory}/dependency-libs</outputDirectory>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> 		</plugins>
> 			
> 	</build>
> ...
> {code}
> Then in the POM C folder execute {{mvn package}}.  The plugin does not work.
> If the same configuration is moved or copied to POM B, then the execution in POM C's folder is repeated, it works fine.
> The same holds true if the above is moved to POM A's {{<pluginManagement>}} node (and the appropriate {{<plugin>}} groupId and artifactId are added to POM C).  It even holds true if you do this and add additional to POM B.  Unless the full config is in POM B (or POM C) then it will not run from POM C.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-5174) Plugin Configuration from Grandparent Not Executed on Grandchild

Posted by "Lon Binder (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279062#comment-279062 ] 

Lon Binder edited comment on MNG-5174 at 9/15/11 8:32 AM:
----------------------------------------------------------

Just to confirm, Benjamin after seeing your example it immediately became clear I had a copy/paste error in the {{<relativePath/>}} in the parent POM.  Sorry to waste your time.  This is definitely user (me) error.

      was (Author: lonbinder):
    Just to confirm, Benjamin after seeing your example it immediately became clear I had a copy/paste error in the {{<relativePath/>}} in the parent POM.  Sorry to waste your time.
  
> Plugin Configuration from Grandparent Not Executed on Grandchild
> ----------------------------------------------------------------
>
>                 Key: MNG-5174
>                 URL: https://jira.codehaus.org/browse/MNG-5174
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 3.0.2
>         Environment: ava version: 1.6.0_24, vendor: Apple Inc.
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"
>            Reporter: Lon Binder
>            Assignee: Benjamin Bentmann
>            Priority: Blocker
>         Attachments: build.log, MNG-5174.zip
>
>
> Summary: The configuration of a plugin in the grandparent of a project, whether in <plugins> or <pluginManagement> is not properly inherited to grandchild.
> To reproduce:
> Setup: 
> POM C extends POM B; POM B extends POM A
> POM A includes:
> {code}
> ...
> 	<build>		
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-dependency-plugin</artifactId>
> 				<version>2.3</version>
> 				<executions>
> 					<execution>
> 						<id>copy-dependencies</id>
> 						<phase>package</phase>
> 						<goals>
> 							<goal>copy-dependencies</goal>
> 						</goals>
> 						<configuration>
> 							<outputDirectory>${project.build.directory}/dependency-libs</outputDirectory>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> 		</plugins>
> 			
> 	</build>
> ...
> {code}
> Then in the POM C folder execute {{mvn package}}.  The plugin does not work.
> If the same configuration is moved or copied to POM B, then the execution in POM C's folder is repeated, it works fine.
> The same holds true if the above is moved to POM A's {{<pluginManagement>}} node (and the appropriate {{<plugin>}} groupId and artifactId are added to POM C).  It even holds true if you do this and add additional to POM B.  Unless the full config is in POM B (or POM C) then it will not run from POM C.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5174) Plugin Configuration from Grandparent Not Executed on Grandchild

Posted by "Lon Binder (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279062#comment-279062 ] 

Lon Binder commented on MNG-5174:
---------------------------------

Just to confirm, Benjamin after seeing your example it immediately became clear I had a copy/paste error in the {{<relativePath/>}} in the parent POM.  Sorry to waste your time.

> Plugin Configuration from Grandparent Not Executed on Grandchild
> ----------------------------------------------------------------
>
>                 Key: MNG-5174
>                 URL: https://jira.codehaus.org/browse/MNG-5174
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 3.0.2
>         Environment: ava version: 1.6.0_24, vendor: Apple Inc.
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"
>            Reporter: Lon Binder
>            Assignee: Benjamin Bentmann
>            Priority: Blocker
>         Attachments: build.log, MNG-5174.zip
>
>
> Summary: The configuration of a plugin in the grandparent of a project, whether in <plugins> or <pluginManagement> is not properly inherited to grandchild.
> To reproduce:
> Setup: 
> POM C extends POM B; POM B extends POM A
> POM A includes:
> {code}
> ...
> 	<build>		
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-dependency-plugin</artifactId>
> 				<version>2.3</version>
> 				<executions>
> 					<execution>
> 						<id>copy-dependencies</id>
> 						<phase>package</phase>
> 						<goals>
> 							<goal>copy-dependencies</goal>
> 						</goals>
> 						<configuration>
> 							<outputDirectory>${project.build.directory}/dependency-libs</outputDirectory>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> 		</plugins>
> 			
> 	</build>
> ...
> {code}
> Then in the POM C folder execute {{mvn package}}.  The plugin does not work.
> If the same configuration is moved or copied to POM B, then the execution in POM C's folder is repeated, it works fine.
> The same holds true if the above is moved to POM A's {{<pluginManagement>}} node (and the appropriate {{<plugin>}} groupId and artifactId are added to POM C).  It even holds true if you do this and add additional to POM B.  Unless the full config is in POM B (or POM C) then it will not run from POM C.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-5174) Plugin Configuration from Grandparent Not Executed on Grandchild

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-5174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-5174.
----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Benjamin Bentmann

> Plugin Configuration from Grandparent Not Executed on Grandchild
> ----------------------------------------------------------------
>
>                 Key: MNG-5174
>                 URL: https://jira.codehaus.org/browse/MNG-5174
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 3.0.2
>         Environment: ava version: 1.6.0_24, vendor: Apple Inc.
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"
>            Reporter: Lon Binder
>            Assignee: Benjamin Bentmann
>            Priority: Blocker
>         Attachments: build.log, MNG-5174.zip
>
>
> Summary: The configuration of a plugin in the grandparent of a project, whether in <plugins> or <pluginManagement> is not properly inherited to grandchild.
> To reproduce:
> Setup: 
> POM C extends POM B; POM B extends POM A
> POM A includes:
> {code}
> ...
> 	<build>		
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-dependency-plugin</artifactId>
> 				<version>2.3</version>
> 				<executions>
> 					<execution>
> 						<id>copy-dependencies</id>
> 						<phase>package</phase>
> 						<goals>
> 							<goal>copy-dependencies</goal>
> 						</goals>
> 						<configuration>
> 							<outputDirectory>${project.build.directory}/dependency-libs</outputDirectory>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> 		</plugins>
> 			
> 	</build>
> ...
> {code}
> Then in the POM C folder execute {{mvn package}}.  The plugin does not work.
> If the same configuration is moved or copied to POM B, then the execution in POM C's folder is repeated, it works fine.
> The same holds true if the above is moved to POM A's {{<pluginManagement>}} node (and the appropriate {{<plugin>}} groupId and artifactId are added to POM C).  It even holds true if you do this and add additional to POM B.  Unless the full config is in POM B (or POM C) then it will not run from POM C.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-5174) Plugin Configuration from Grandparent Not Executed on Grandchild

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-5174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279064#comment-279064 ] 

Benjamin Bentmann commented on MNG-5174:
----------------------------------------

No need to apologize, but I would like to repeat my request to provide runnable example projects along with filled issues. They do not only provide as a solid basis for bug reproduction/analysis but they can also help users to spot typos/misconfiguration, usually before a committer has a chance to look at the bug report.

> Plugin Configuration from Grandparent Not Executed on Grandchild
> ----------------------------------------------------------------
>
>                 Key: MNG-5174
>                 URL: https://jira.codehaus.org/browse/MNG-5174
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 3.0.2
>         Environment: ava version: 1.6.0_24, vendor: Apple Inc.
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"
>            Reporter: Lon Binder
>            Assignee: Benjamin Bentmann
>            Priority: Blocker
>         Attachments: build.log, MNG-5174.zip
>
>
> Summary: The configuration of a plugin in the grandparent of a project, whether in <plugins> or <pluginManagement> is not properly inherited to grandchild.
> To reproduce:
> Setup: 
> POM C extends POM B; POM B extends POM A
> POM A includes:
> {code}
> ...
> 	<build>		
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-dependency-plugin</artifactId>
> 				<version>2.3</version>
> 				<executions>
> 					<execution>
> 						<id>copy-dependencies</id>
> 						<phase>package</phase>
> 						<goals>
> 							<goal>copy-dependencies</goal>
> 						</goals>
> 						<configuration>
> 							<outputDirectory>${project.build.directory}/dependency-libs</outputDirectory>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> 		</plugins>
> 			
> 	</build>
> ...
> {code}
> Then in the POM C folder execute {{mvn package}}.  The plugin does not work.
> If the same configuration is moved or copied to POM B, then the execution in POM C's folder is repeated, it works fine.
> The same holds true if the above is moved to POM A's {{<pluginManagement>}} node (and the appropriate {{<plugin>}} groupId and artifactId are added to POM C).  It even holds true if you do this and add additional to POM B.  Unless the full config is in POM B (or POM C) then it will not run from POM C.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira