Class CreateTimestampMojo

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

    @Mojo(name="create-timestamp",
          defaultPhase=INITIALIZE,
          requiresProject=true,
          threadSafe=true)
    public class CreateTimestampMojo
    extends org.apache.maven.plugin.AbstractMojo
    This mojo is designed to give you a timestamp available through one or more properties. Only a single timestamp is created for each execution of the mojo. This timestamp can be format into one or more strings which are then saved to properties.
    Since:
    1.0-beta-5
    Version:
    $Id: CreateTimestampMojo.java 19569 2014-03-21 21:27:32Z baptiste $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.maven.project.MavenProject project
      The maven project.
      private java.util.List reactorProjects
      Contains the full list of projects in the reactor.
      private boolean skip
      Whether to skip this execution.
      private java.lang.String timestampFormat
      Apply this java.text.SimpleDateFormat to the timestamp.
      private java.lang.String timestampPropertyName
      You can rename the timestamp property name to another property name if desired.
      • 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()  
      • 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

      • skip

        @Parameter(property="maven.buildNumber.skip",
                   defaultValue="false")
        private boolean skip
        Whether to skip this execution.
        Since:
        1.3
      • project

        @Parameter(defaultValue="${project}",
                   required=true,
                   readonly=true)
        private org.apache.maven.project.MavenProject project
        The maven project.
      • reactorProjects

        @Parameter(defaultValue="${reactorProjects}",
                   required=true,
                   readonly=true)
        private java.util.List reactorProjects
        Contains the full list of projects in the reactor.
      • timestampPropertyName

        @Parameter(property="maven.buildNumber.timestampPropertyName",
                   defaultValue="timestamp")
        private java.lang.String timestampPropertyName
        You can rename the timestamp property name to another property name if desired.
      • timestampFormat

        @Parameter(property="maven.buildNumber.timestampFormat",
                   defaultValue="")
        private java.lang.String timestampFormat
        Apply this java.text.SimpleDateFormat to the timestamp. By default, no formatting is done but the raw number value (milliseconds since January 1, 1970, 00:00:00 GMT) is used.
    • Constructor Detail

      • CreateTimestampMojo

        public CreateTimestampMojo()
    • Method Detail

      • execute

        public void execute()