Maven 2 & 3
  1. Maven 2 & 3
  2. MNG-1830

add a 'compiled on <timestamp>' label when maven 2 is invoked with --version option

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.11, 2.1.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      2

      Description

      It might be a good idea to append
      'compiled on <timestamp>'

      when maven2 is invoked with '--version' swtich/option, just like Ant does. Can be helpful when compiling m2 locally 'n' times and need to ensure the m2 installation was infact updated or when was it last updated.

      1. bootstrap_builtOn.patch
        0.9 kB
        Sharmarke Aden
      2. maven-archiver_builtOn.patch
        1 kB
        Sharmarke Aden

        Activity

        Hide
        Brett Porter added a comment -

        I thought this was already done, but I checked 2.0.1 and it wasn't. What was included in 2.0.1?

        Show
        Brett Porter added a comment - I thought this was already done, but I checked 2.0.1 and it wasn't. What was included in 2.0.1?
        Hide
        Rahul Thakur added a comment -

        ping!
        Timestamp still doesn't show up.

        Show
        Rahul Thakur added a comment - ping! Timestamp still doesn't show up.
        Hide
        Sharmarke Aden added a comment -

        The truck version of "maven-cli/src/main/java/org/apache/maven/cli/MavenCli.java" includes the necessary code to add the build date when mvn --version is invoked but the problem is that MavenArchiver doesn't include the "builtOn" property that MavenCli looks for. I've created a patch for the MavenArchiver in component to add a "builtOn" property to the pom.properties file it generates. The maven bootstrap component also doesn't include the "builtOn" property to pom.properties file it generates. I have created a patch for that too.

        Note that the date format is "MMM d yyyy" (i.e. May 15 2006).

        Show
        Sharmarke Aden added a comment - The truck version of "maven-cli/src/main/java/org/apache/maven/cli/MavenCli.java" includes the necessary code to add the build date when mvn --version is invoked but the problem is that MavenArchiver doesn't include the "builtOn" property that MavenCli looks for. I've created a patch for the MavenArchiver in component to add a "builtOn" property to the pom.properties file it generates. The maven bootstrap component also doesn't include the "builtOn" property to pom.properties file it generates. I have created a patch for that too. Note that the date format is "MMM d yyyy" (i.e. May 15 2006).
        Hide
        Sharmarke Aden added a comment -

        Patch that adds "builtOn" property to pom.properties generated by MavenArchiver.

        Show
        Sharmarke Aden added a comment - Patch that adds "builtOn" property to pom.properties generated by MavenArchiver.
        Hide
        Sharmarke Aden added a comment -

        Patch that adds "builtOn" property to pom.properties generated by bootstrap component.

        Show
        Sharmarke Aden added a comment - Patch that adds "builtOn" property to pom.properties generated by bootstrap component.
        Hide
        Sharmarke Aden added a comment -

        I have submitted the Maven-Archive patch to the archive component. Please use that patch instead. Note that a minor change has been made to the date format. It is now "MMM d yyyy HH:mm:ss z"

        http://jira.codehaus.org/browse/MNG-2301

        Show
        Sharmarke Aden added a comment - I have submitted the Maven-Archive patch to the archive component. Please use that patch instead. Note that a minor change has been made to the date format. It is now "MMM d yyyy HH:mm:ss z" http://jira.codehaus.org/browse/MNG-2301
        Hide
        Jason van Zyl added a comment -

        Bootstrap is entirely different now. Ant-based and it's not really a problem making sure you have the right Maven ... knowing from experience building it 20 times a day when applying patches for example.

        Show
        Jason van Zyl added a comment - Bootstrap is entirely different now. Ant-based and it's not really a problem making sure you have the right Maven ... knowing from experience building it 20 times a day when applying patches for example.
        Hide
        Brett Porter added a comment -

        regardless, built on would be a useful addition to the --version output

        Show
        Brett Porter added a comment - regardless, built on would be a useful addition to the --version output
        Hide
        Brett Porter added a comment -

        patches are not applicable for this

        Show
        Brett Porter added a comment - patches are not applicable for this
        Hide
        Brett Porter added a comment -

        worth looking at the buildnumber plugin too so the svn rev can be included

        Show
        Brett Porter added a comment - worth looking at the buildnumber plugin too so the svn rev can be included
        Hide
        Brett Porter added a comment -

        Format is:

        Apache Maven 2.1.0-M2-SNAPSHOT (r727655; Fri Dec 19 03:35:57 EST 2008)

        Date is displayed in your locale.

        Show
        Brett Porter added a comment - Format is: Apache Maven 2.1.0-M2-SNAPSHOT (r727655; Fri Dec 19 03:35:57 EST 2008) Date is displayed in your locale.
        Hide
        Paul Benedict added a comment -

        Can you please use the ISO date-time format so that it's a known output in case someone wants to parse it.

        Show
        Paul Benedict added a comment - Can you please use the ISO date-time format so that it's a known output in case someone wants to parse it.
        Hide
        Vincent Siveton added a comment -

        I second Paul.

        Show
        Vincent Siveton added a comment - I second Paul.
        Hide
        Brett Porter added a comment -

        makes sense

        Show
        Brett Porter added a comment - makes sense
        Hide
        Brett Porter added a comment -

        done

        Show
        Brett Porter added a comment - done

          People

          • Assignee:
            Brett Porter
            Reporter:
            Rahul Thakur
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: