Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-198

[scm:tag] Add Ability to Append Timestamp to Tag Name

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-4
    • maven-plugin
    • None

    Description

      I have created a patch that, based on configuration properties, appends today's date/time to the tag name that I would like to share and see part of scm plug-in's future releases. This enhancement adds three new configuration properties.

      1) A Boolean property called "addTimestamp" which indicates whether the plug-in should append timestamp to the tag name.
      2) A string property called "timestampFormat" which contains date pattern akin to java.text.SimpleDateFormat class. If "timestampFormat" is not set and "addTimestamp" property is set to true the default date pattern of "yyyyMMddHHmmss" will be used.
      3) A string property called "timestampPrefix" which will be used to separate the tag name and the timestamp. The default timestampPrefix value is "-"

      Here is what the plug-in definition should look like:

      <plugins>
      ....
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-scm-plugin</artifactId>
      <version>1.0-beta-3</version>
      <executions>
      <execution>
      <phase>deploy</phase>
      <goals>
      <goal>tag</goal>
      </goals>
      </execution>
      </executions>
      <configuration>
      <tagBase>http://my/svn/project/tags</tagBase>
      <tag>my-tag-name</tag>
      <addTimestamp>true</addTimestamp>
      <timestampFormat>yyyyMMddHHmmss</timestampFormat>
      <timestampPrefix>tag</timestampPrefix>
      </configuration>
      </plugin>
      ...
      </plugins>

      Note that both timestampFormat and timestampPrefix have default values and therefore are optional.

      Attachments

        1. timestamp.patch
          3 kB
          Sharmarke Aden

        Activity

          People

            evenisse Emmanuel Venisse
            saden1 Sharmarke Aden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: