You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2005/04/28 04:09:46 UTC

[jira] Closed: (MNG-362) inheritance problem

     [ http://jira.codehaus.org/browse/MNG-362?page=all ]
     
Brett Porter closed MNG-362:
----------------------------

    Fix Version: 2.0-alpha-2
     Resolution: Fixed

this was fixed by John's changes, and I have made some additional changes so that a plugin definition is -never- inherited (only plugin management is)

> <pluginManagement> inheritance problem
> --------------------------------------
>
>          Key: MNG-362
>          URL: http://jira.codehaus.org/browse/MNG-362
>      Project: m2
>         Type: Bug
>     Versions: 2.0-alpha-1
>     Reporter: Peter van de Hoef
>      Fix For: 2.0-alpha-2
>  Attachments: plugin-management-issue.tar.gz
>
>
> I have specified a <pluginManagement> section in the parent POM
> which is not inherited by the child POM.
> The plugin in question is the 'maven-compiler-plugin' which is configured for JDK 1.5 source compatibility.
> In the parent POM, this setting is effectuated, but not in the child. When compiling the child, the compiler complains about JDK 1.4+ features in the java source.
> A simple test case is attached to reproduce the problem.
> The parent POM looks like:
> <project>
>     <name>Parent POM</name>
>     <groupId>_test</groupId>
>     <artifactId>parent</artifactId>
>     <version>1.0</version>
>     <packaging>pom</packaging>
>     
>     <modules>
>         <module>child</module>
>     </modules>
>     <build>
>         <sourceDirectory>src</sourceDirectory>
>         <pluginManagement>
>             <plugins>
>                 <plugin>
>                     <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-compiler-plugin</artifactId>
>                     <version>1.0-alpha-2-SNAPSHOT</version>
>                     <configuration>
>                         <source>1.5</source>
>                         <target>1.5</target>
>                     </configuration>
>                 </plugin>
>             </plugins>
>         </pluginManagement>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>             </plugin>
>         </plugins>
>     </build>
> </project>
> And the child, which inherits from the parent:
> The <build> section is overridden with a different <sourceDirectory> and, since the <plugins> of the parent gets lost, it is repeated.
> <project>
>     <name>Child POM</name>
>     <groupId>_test</groupId>
>     <artifactId>child</artifactId>
>     <version>1.0</version>
>     <packaging>pom</packaging>
>     <parent>
>         <groupId>_test</groupId>
>         <artifactId>parent</artifactId>
>         <version>1.0</version>
>     </parent>
>     
>     <build>
>         <sourceDirectory>src2</sourceDirectory>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>             </plugin>
>         </plugins>
>     </build>
> </project>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org