POM allows duplicate plugin configuration
-----------------------------------------

                 Key: MNG-4487
                 URL: http://jira.codehaus.org/browse/MNG-4487
             Project: Maven 2
          Issue Type: Improvement
    Affects Versions: 2.0.9
            Reporter: Ken Wong
            Priority: Minor


I have a project that uses FlexMOJO to compile the swc and then optimize and 
create a swf. If you look at the following pom extract, you will see that I 
defined the configuration for the same plugin twice (flexmojos-maven-plugin). 
There was no error but having the duplicate definition caused maven to be 
confused and the locale and namespace parameters ended up being 'lost'. If I 
comment out the 2nd part, then it works. If having duplicate definition 
confuses maven, it would be nice to have it throw an error when it sees 
duplicate configuration for the same plugin, instead of yielding confusing 
result.

build>
                <plugins>
                        <plugin>
                                <groupId>org.sonatype.flexmojos</groupId>
                                <artifactId>flexmojos-maven-plugin</artifactId>

                                <configuration>
                                        <compiledLocales>
                                                <locale>en_US</locale>
                                                <locale>es_ES</locale>
                                                <locale>ja_JP</locale>
                                        </compiledLocales>

resourceBundlePath>

                                        <namespaces>
                                                <namespace>
                                                        
<uri>http://www.stoneriver.com/2009/uicore</uri>
                                                        
<manifest>${basedir}/src/manifest.xml</manifest>
                                                </namespace>
                                        </namespaces>

                                        <includeNamespaces>
                                                
<namespace>http://www.stoneriver.com/2009/uicore</namespace>
                                        </includeNamespaces>

                                </configuration>
                        </plugin>


                                 <plugin>
                                 <groupId>org.sonatype.flexmojos</groupId>
                                 <artifactId>flexmojos-maven-plugin</artifactId>
                                 <executions>
                                 <execution>
                                 <goals>
                                 <goal>optimize</goal>
                                 </goals>
                                 </execution>
                                 </executions>
                                 </plugin>
 
                </plugins> 
</build>

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