[ 
http://jira.codehaus.org/browse/MNG-3018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Semb Wever reopened MNG-3018:
-------------------------------------


The above snippet is enough to put into the pom.xml, along with a 
<modules><module>... for a child project.
Given that the parent project does not have java sources, and the child project 
does, step into the child project and build.
It should builds ok, with the settings as defined under the parent's 
pluginManagement for maven-compiler-plugin.
This is because the maven-compiler-plugin is included by default when you 
compile java sources, and when it is installed by default it sucks in the 
settings defined within the pluginManagement.

Now, instead of building, run/debug the embedder to output the child's pom (or 
however the embedder works to extract this information) and you'll see that the 
maven-compiler-plugin settings are not "sucked in".

Reading the original issue, http://jira.codehaus.org/browse/MEVENIDE-532 , goes 
through the original issue report at a more user-level, since i originally 
thought the problem was in the netbeans maven-project implementation, but the 
author there reported that it's actually the maven embedder which is not 
extracting the information defined it pluginManagement.

If i change pluginManagement to just plugins then it works correctly, but every 
plugin listed within plugins is therefore loaded into each subprojects maven 
build process, yuk.

> pluginManagement configurations are not honoured when plugin is silently 
> included
> ---------------------------------------------------------------------------------
>
>                 Key: MNG-3018
>                 URL: http://jira.codehaus.org/browse/MNG-3018
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Embedding
>            Reporter: Michael Semb Wever
>
> Read http://jira.codehaus.org/browse/MEVENIDE-532
> In my top parent pom.xml i've define the maven-compiler-plugin configuration 
> like:
> <build>
> <pluginManagement>
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> <encoding>UTF-8</encoding>
> </configuration>
> </plugin> ...
> since not all my subprojects require the plugin, and when they do they 
> silently include the plugin, it makes more sense to define it within the 
> <pluginManagement> tag.
> But when i use mevenide-netbeans all my projects are marked uncompilable 
> since the maven embedder does not report the above defined configuration for 
> the maven-compiler-plugin.

-- 
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

        

Reply via email to