[ 
http://jira.codehaus.org/browse/MECLIPSE-436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=202507#action_202507
 ] 

Andreas Höhmann commented on MECLIPSE-436:
------------------------------------------

Hello again ;)

this issue is still open ... today I tried to use plugin-management to "solve" 
the problem

= Super POM = 

Here I want define the default configuration for eclipse ...

{code:xml}
...
<pluginManagement>
 <plugins>
  <plugin>
    <artifactId>maven-eclipse-plugin</artifactId>
    <version>${maven.eclipse.plugin.version}</version>
    <inherited>true</inherited>
    <configuration>
      <downloadSources>true</downloadSources>
      <downloadJavadocs>true</downloadJavadocs>
      <useProjectReferences>false</useProjectReferences>
      
<limitProjectReferencesToWorkspace>true</limitProjectReferencesToWorkspace>
      <additionalProjectnatures>
        <projectnature>net.sf.eclipsecs.core.CheckstyleNature</projectnature>
        
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
      </additionalProjectnatures>
      <additionalBuildcommands>
        <buildcommand>net.sf.eclipsecs.core.CheckstyleBuilder</buildcommand>
        
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
      </additionalBuildcommands>
      <additionalConfig>
        <file>
          <name>.checkstyle</name>
          <content>
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.2.0" simple-config="false">
  <local-check-config name="CS" location=".checkstyle-5.0.xml" type="project" 
description="">
    <property name="checkstyle.header.file" 
value="${basedir}/.checkstyle_copyright.java.txt" />
    <additional-data name="protect-config-file" value="false" />
  </local-check-config>
  <fileset name="Java Files" enabled="true" check-config-name="CS" local="true">
    <file-match-pattern match-pattern="\.java$" include-pattern="true" />
  </fileset>
  <filter name="WriteProtectedFiles" enabled="true" />
  <filter name="UnOpenedFiles" enabled="true" />
  <filter name="FilesFromPackage" enabled="true" />
  <filter name="NonSrcDirs" enabled="true" />
</fileset-config>]]>
       </content>
     </file>
     <file>
       <name>.checkstyle-5.0.xml</name>
       <location>checkstyle/checkstyle-5.0.xml</location>
     </file>
     <file>
       <name>.checkstyle_copyright.java.txt</name>
       <location>checkstyle/copyright.java.txt</location>
     </file>
     <file>
       <name>.settings/org.eclipse.core.resources.prefs</name>
       <location>eclipse/org.eclipse.core.resources.prefs</location>
     </file>
     <file>
       <name>.settings/org.eclipse.jdt.core.prefs</name>
       <location>eclipse/org.eclipse.jdt.core.prefs</location>
     </file>
     <file>
       <name>.settings/org.eclipse.jdt.ui.prefs</name>
       <location>eclipse/org.eclipse.jdt.ui.prefs</location>
     </file>
  ...
{code} 

= Child POM =

Here I want define some additional configurations :

{code:xml}
<build>
  <plugins>
    <plugin>
      <artifactId>maven-eclipse-plugin</artifactId>
      <configuration>
        <wtpmanifest>true</wtpmanifest>
        <wtpapplicationxml>true</wtpapplicationxml>
        <wtpversion>2.0</wtpversion>
        <additionalConfig>
          <file>
            <!-- overwrite default spring config -->
            <name>.springBeans</name>
            <content>
...

{code}

I tried with maven 3.0 alpha 5 and eclipse-plugin 2.7 ...
The configuration of the child POM doesn' containt the default config from 
plugin-management :-(

Regards
Andreas

> Plugin configuration is not inherited/merged correctly
> ------------------------------------------------------
>
>                 Key: MECLIPSE-436
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-436
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5.1
>         Environment: mvn 2.0.8
>            Reporter: Andreas Höhmann
>            Priority: Critical
>
> I don't know if this is a maven problem or a plugin-problem:
> Parent-pom:
> ...
>    <plugin>
>         <inherited>true</inherited>
>         <artifactId>maven-eclipse-plugin</artifactId>
>         <configuration>
>           <projectNameTemplate>[artifactId]</projectNameTemplate>
>           <downloadSources>true</downloadSources>
>           <downloadJavadocs>true</downloadJavadocs>
>           <wtpmanifest>true</wtpmanifest>
>           <wtpapplicationxml>true</wtpapplicationxml>
>           <wtpversion>2.0</wtpversion>
>           
> <manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF</manifest>
>           <additionalProjectnatures>
>             
> <projectnature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</projectnature>
>             
> <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
>             
> <projectnature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</projectnature>
>           </additionalProjectnatures>
>           <additionalBuildcommands>
>             
> <buildcommand>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</buildcommand>
>             
> <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
>             
> <buildcommand>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</buildcommand>
>           </additionalBuildcommands>
>           <additionalConfig>
>             <file>
>               <name>.checkstyle</name>
>               <location>checkstyle/checkstyle.xml</location>
>             </file>
>            <file>
>               
> <name>.settings/org.springframework.ide.eclipse.core.prefs</name>
>               <content>
>                 <![CDATA[<?xml version="1.0" encoding="UTF-8"?>
> eclipse.preferences.version=1
> ....
>               </content>
>             </file>
>             <file>
>               <name>.fbprefs</name>
>               <content>
>                 <![CDATA[#FindBugs User Preferences
> detectorBadAppletConstructor=BadAppletConstructor|false
> ....
>             </file>
>           </additionalConfig>
>         </configuration>
>         <dependencies>
>           <dependency>
>             <groupId>com.siemens.spice.sid</groupId>
>             <artifactId>build-tools</artifactId>
>             <version>1.0-SNAPSHOT</version>
>           </dependency>
>         </dependencies>
>       </plugin>
> ...
> Sub-project-pom:
>  
>    <parent>
>     <artifactId>sid-base</artifactId>
>     <groupId>com.siemens.spice.sid</groupId>
>     <version>1.0-SNAPSHOT</version>
>   </parent>
>   ....
>     <plugin>
>         <artifactId>maven-eclipse-plugin</artifactId>
>         <inherited>true</inherited>
>         <configuration>
>           <additionalConfig>
>             <file>
>               <name>.springBeans</name>
>               <content>
>                 <![CDATA[<?xml version="1.0" encoding="UTF-8"?>
> <beansProjectDescription>
>   <configExtensions>
>     <configExtension>xml</configExtension>
>   </configExtensions>
>   <configs>
>     <config>src/main/resources/spring-beans-application.xml</config>
>     <config>src/main/resources/spring-beans-services.xml</config>
>     <config>src/main/resources/spring-beans-commands.xml</config>
>   </configs>
>   <configSets>
>     <configSet>
>       <name>core</name>
>       <allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
>       <incomplete>false</incomplete>
>       <configs>
>         <config>src/main/resources/spring-beans-application.xml</config>
>         <config>src/main/resources/spring-beans-commands.xml</config>
>         <config>src/main/resources/spring-beans-services.xml</config>
>       </configs>
>     </configSet>
>   </configSets>
> </beansProjectDescription>]]>
>               </content>
>             </file>
>           </additionalConfig>
>         </configuration>
>       </plugin>
> ...
> If i run mvn eclipse:clean eclipse:eclipse in the subproject ... only the 
> .springBeans file will be created. 
> If i remove the plugin from the subproject-pom only the .checkstyle, .fbprefs 
> will be created but NO .springBeans.
> I would like to merge parent-configuration with sub-project-configuration.
> Is this possible?

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