A large undocumented project whose build I am trying to cleanup has maven warnings about duplicate plugin declaration.
The pom.xml is something like
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>${project.basedir}/src/main/webapp</directory>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<attachClasses>true</attachClasses>
<classesClassifier>classes</classesClassifier>
</configuration>
</plugin>
I need to change it so it does not log warnings yet behaves exactly as it does now.
I guess, there are three possibilities:
But which one is it?
Run with debug logging (-X), find the occurrences/mentions of the war plugin in the log, and see what configuration is present. Then make your POMs look like that configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With