Class AbstractVersionMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    AttachVersionMojo, UpdateVersionTextMojo

    public abstract class AbstractVersionMojo
    extends org.apache.maven.plugin.AbstractMojo
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.io.File basedir
      The project basedir.
      protected java.lang.String classifier
      The classifier to use for attaching the generated VERSION.txt artifact
      protected org.apache.maven.project.MavenProject project
      Maven Project.
      protected org.apache.maven.project.MavenProjectHelper projectHelper
      Maven ProjectHelper.
      protected java.lang.String type
      The type to use for the attaching the generated VERSION.txt artifact
      protected java.io.File versionTextInputFile
      The existing VERSION.txt file.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void ensureDirectoryExists​(java.io.File dir)  
      protected boolean hasVersionTextFile​(java.lang.String goal)  
      • 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
      • Methods inherited from interface org.apache.maven.plugin.Mojo

        execute
    • Field Detail

      • basedir

        protected java.io.File basedir
        The project basedir.
        Parameter:
        expression="${project.basedir}"
        Required:
      • versionTextInputFile

        protected java.io.File versionTextInputFile
        The existing VERSION.txt file.

        Parameter:
        expression="${version.text.file}" default-value="${project.basedir}/VERSION.txt"
      • classifier

        protected java.lang.String classifier
        The classifier to use for attaching the generated VERSION.txt artifact
        Parameter:
        expression=${version.text.output.classifier}" default-value="version"
      • type

        protected java.lang.String type
        The type to use for the attaching the generated VERSION.txt artifact
        Parameter:
        expression=${version.text.output.type}" default-value="txt"
      • projectHelper

        protected org.apache.maven.project.MavenProjectHelper projectHelper
        Maven ProjectHelper. (internal component)
        Required:
        Read-Only:
      • project

        protected org.apache.maven.project.MavenProject project
        Maven Project.
        Parameter:
        expression="${project}"
        Required:
        Read-Only:
    • Constructor Detail

      • AbstractVersionMojo

        public AbstractVersionMojo()
    • Method Detail

      • ensureDirectoryExists

        protected void ensureDirectoryExists​(java.io.File dir)
                                      throws org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoFailureException
      • hasVersionTextFile

        protected boolean hasVersionTextFile​(java.lang.String goal)