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 upgra
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.
Even though this has already gotten the "approved answer", it turns out that there is this AWESOME versions plugin that handles the neverending version maintenance problem.
For those lazy people here are some of its goals:
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:
"The regular plugins section also allows the version and default configuration to be defined, and this is where the confusion lies. It is technically valid to define the plugin version and default configuration here, but I find it easier to grok the pom when following this guideline:
If the plugin block is not defining an execution (and thus binding maven to do something in the lifecycle), put that block in pluginManagment"
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.