Class MavenVersionMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="maven-version",
          defaultPhase=VALIDATE,
          threadSafe=true)
    public class MavenVersionMojo
    extends AbstractDefinePropertyMojo
    Store the maven core version in a property maven.version.
    Since:
    1.3
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.maven.execution.RuntimeInformation runtime
      The RuntimeInforamtion for the current instance of Maven.
      private java.lang.String versionProperty
      The name of the property in which to store the version of Maven.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Main plugin execution
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • runtime

        @Component
        private org.apache.maven.execution.RuntimeInformation runtime
        The RuntimeInforamtion for the current instance of Maven.
      • versionProperty

        @Parameter(defaultValue="maven.version")
        private java.lang.String versionProperty
        The name of the property in which to store the version of Maven.
    • Constructor Detail

      • MavenVersionMojo

        public MavenVersionMojo()
    • Method Detail

      • execute

        public void execute()
        Main plugin execution