I am using the maven-ear-plugin version 2.3.1 - I know there is a new version available: http://maven.apache.org/plugins/maven-ear-plugin/
I can't work out how to upgrade to the latest version??
I am using the maven-ear-plugin version 2.3.1 - I know there is a new version available: http://maven.apache.org/plugins/maven-ear-plugin/
I can't work out how to upgrade to the latest version??
The default plugin versions are inherited from the Super POM, and you can check them with mvn help:effective-pom
.
If you want to override the version provided there, add this to your POM:
<project>
<build>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.1</version>
</plugin>
</plugins>
</build>
</project>
Replace the version with what you need.
Some maven plugins are restricted to maven versions. For example, generally projects around here use Maven 2.0.4, which is restricted to use the war plugin 2.0.2 - this works with overlays. The 2.1-alpha whatever, however, that Maven 2.0.9 uses, does not - so we had to manually downgrade. Maven, unless otherwise instructed, will attempt to use the latest version of a plugin that it can according to its version.
How the version of a plugin is selected, along with discussion about the plugin versions in the superpom is covered in detail here.
Actually the currently selected answer isn't quite right. It should be
<project>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
I explained why here.