Class PluginVersionInfoMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="plugin-versions", aggregator=true, defaultPhase=VALIDATE) public class PluginVersionInfoMojo extends AbstractVersionInfoMojo
Mojo to determine the versions of all maven plugins used in the current project.
It logs the versions in XML-format ready to use within the properties section of a pom file. The property names are of the form version.groupIdInCamelCase.artifactIdInCamelCase.

Example:

   mvn tentackle:plugin-versions
   ...
   [INFO] 
   [INFO] --- tentackle-maven-plugin:13.0-SNAPSHOT:plugin-versions (default-cli) @ admin-parent ---
   [INFO] versions of plugins:
   <version.orgApacheMavenPlugins.mavenCleanPlugin>3.1.0</version.orgApacheMavenPlugins.mavenCleanPlugin>
   <version.orgApacheMavenPlugins.mavenCompilerPlugin>3.8.1</version.orgApacheMavenPlugins.mavenCompilerPlugin>
   <version.orgApacheMavenPlugins.mavenDependencyPlugin>3.1.1</version.orgApacheMavenPlugins.mavenDependencyPlugin>
   <version.orgApacheMavenPlugins.mavenDeployPlugin>2.8.2</version.orgApacheMavenPlugins.mavenDeployPlugin>
   <version.orgApacheMavenPlugins.mavenEnforcerPlugin>3.0.0-M1</version.orgApacheMavenPlugins.mavenEnforcerPlugin>
   <version.orgApacheMavenPlugins.mavenInstallPlugin>2.5.2</version.orgApacheMavenPlugins.mavenInstallPlugin>
   <version.orgApacheMavenPlugins.mavenJarPlugin>3.1.2</version.orgApacheMavenPlugins.mavenJarPlugin>
   <version.orgApacheMavenPlugins.mavenJavadocPlugin>3.1.1</version.orgApacheMavenPlugins.mavenJavadocPlugin>
   <version.orgApacheMavenPlugins.mavenResourcesPlugin>3.1.0</version.orgApacheMavenPlugins.mavenResourcesPlugin>
   <version.orgApacheMavenPlugins.mavenSitePlugin>3.8.2</version.orgApacheMavenPlugins.mavenSitePlugin>
   ...
 
Notice: the whole project must have been successfully built before invoking this goal.
  • Constructor Details

    • PluginVersionInfoMojo

      public PluginVersionInfoMojo()
  • Method Details

    • executeImpl

      public void executeImpl() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Specified by:
      executeImpl in class AbstractTentackleMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException