jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 2.x Build Helper Plugin
  • Maven 2.x Build Helper Plugin
  • MBUILDHELPER-21

new goal "current-time"

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

The goal should provide "now" as formatted string in a property. The goal should have 4 parameters:

  1. timeZone: A time zone string (like UTC or Europe/Berlin) used to transform the local time with TZ.getDefault() as default
  2. format: A string passed to a SimpleDateFormat using something like "yyyy-MM-dd'T'HH:mm:ss.SSSZ" as default
  3. locale: The locale used for the formatted string using Locale.ENGLISH as default
  4. currentTimeProperty: The name of the property in which to store the result

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Robert Scholte added a comment - 24/Mar/10 9:35 AM

Most people don't know this, but since maven-2.1.0 there's a special/magic variable which does almost the same thing, namely maven.build.timestamp :
More details can be found here:
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Available_Variables

Show
Robert Scholte added a comment - 24/Mar/10 9:35 AM Most people don't know this, but since maven-2.1.0 there's a special/magic variable which does almost the same thing, namely maven.build.timestamp : More details can be found here: http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Available_Variables
Hide
Permalink
Dan Tran added a comment - 24/Mar/10 11:31 AM

I am all for adding this goal but it must be compatible with maven 2.x. Could we change it to build-helper:timestamp?

buildnumber-maven-plugin also provides this capability, beside from being confusing , it also requires a valid SCM which we dont have sometimes, specially when we need to build from source bundle deployed at maven repo.

Show
Dan Tran added a comment - 24/Mar/10 11:31 AM I am all for adding this goal but it must be compatible with maven 2.x. Could we change it to build-helper:timestamp? buildnumber-maven-plugin also provides this capability, beside from being confusing , it also requires a valid SCM which we dont have sometimes, specially when we need to build from source bundle deployed at maven repo.
Hide
Permalink
Jörg Schaible added a comment - 24/Mar/10 12:22 PM

@Robert: Thanks, this will solve my primary problem.

@Dan:

  1. buildnumber plugin is really very unfortunate, because it will execute in any case a shell script calling subversion and would increase out build time with ~300 artifacts tremendously
  2. I am not tied to a name of the goal. However, you may use the goal multiple times with different configuration to get a variable with current year, a timestamp, a localized long date, UTC time, etc. The goal name should IMHO reflect this possibility.
Show
Jörg Schaible added a comment - 24/Mar/10 12:22 PM @Robert: Thanks, this will solve my primary problem. @Dan: buildnumber plugin is really very unfortunate, because it will execute in any case a shell script calling subversion and would increase out build time with ~300 artifacts tremendously I am not tied to a name of the goal. However, you may use the goal multiple times with different configuration to get a variable with current year, a timestamp, a localized long date, UTC time, etc. The goal name should IMHO reflect this possibility.
Hide
Permalink
Dan Tran added a comment - 24/Mar/10 12:44 PM

build-helper:current-time that is!!

Show
Dan Tran added a comment - 24/Mar/10 12:44 PM build-helper:current-time that is!!
Hide
Permalink
François Wauquier added a comment - 25/Mar/10 4:55 AM

Hi

didn't know about maven.build.timestamp good news!

You should be inspired by http://code.google.com/p/maven-timestamp-plugin/
which already offer this functionality, with possibility to use a pattern, you called 'format'.

Show
François Wauquier added a comment - 25/Mar/10 4:55 AM Hi didn't know about maven.build.timestamp good news! You should be inspired by http://code.google.com/p/maven-timestamp-plugin/ which already offer this functionality, with possibility to use a pattern, you called 'format'.
Hide
Permalink
Paul Gier added a comment - 12/Dec/10 4:00 PM

The buildnumber-maven-plugin currently mixes timestamp with getting the scm revision number, but as of MOJO-1422, you will be able to get a timestamp by itself.

Show
Paul Gier added a comment - 12/Dec/10 4:00 PM The buildnumber-maven-plugin currently mixes timestamp with getting the scm revision number, but as of MOJO-1422 , you will be able to get a timestamp by itself.
Hide
Permalink
Paul Gier added a comment - 25/May/11 10:03 AM

Closing this issue since the buildnumber Maven plugin now provides a timestamp goal

Show
Paul Gier added a comment - 25/May/11 10:03 AM Closing this issue since the buildnumber Maven plugin now provides a timestamp goal

People

  • Assignee:
    Unassigned
    Reporter:
    Jörg Schaible
Vote (0)
Watch (0)

Dates

  • Created:
    24/Mar/10 9:25 AM
    Updated:
    25/May/11 10:03 AM
    Resolved:
    25/May/11 10:03 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.