You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marshall Schor <ms...@schor.com> on 2010/04/28 17:53:07 UTC

getting multiple forms of the build date

There's a new way to get the build date, documented here:
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html  -
search for maven.build.timestamp.

This is nice.

I would like to have multiple versions of this.  For instance, the whole
date/time spec for including in Jar Manifests, and just the month and
year for substituting in to documentation publication date.

Is there a way to get multiple, different formats for this?

-Marshall

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: getting multiple forms of the build date

Posted by Marshall Schor <ms...@schor.com>.

On 4/28/2010 11:53 AM, Marshall Schor wrote:
> There's a new way to get the build date, documented here:
> http://maven.apache.org/guides/introduction/introduction-to-the-pom.html  -
> search for maven.build.timestamp.
>
> This is nice.
>
> I would like to have multiple versions of this.  For instance, the whole
> date/time spec for including in Jar Manifests, and just the month and
> year for substituting in to documentation publication date.
>
> Is there a way to get multiple, different formats for this?
>   

I couldn't find one.  I found one ref that used a groovy script with the
gmaven plugin to do this, and it worked, but was slow, because it has to
load up groovy.

So, I wrote my first maven plugin.  It takes a series of specs which are
the simple date and time patterns strings described in the Java class
SimpleDateFormat API, and sets the value(s) into property names that are
also passed in as part of the configuration.  Works like  a charm, and
is very fast.

-Marshall
> -Marshall
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org