I think this is a good idea, but instead of worrying about the format to output,
how about using the ISO8601 formatting guidelines?

Simple pattern would be: "yyyy-MM-dd'T'HH:mm:ss"

But that pattern does not take in account the Timezone.
We can use the recommendations in ISO8601 and either...
(a) Adjust the time to UTC before output.
   Using the pattern: "yyyy-MM-dd'T'HH:mm:ss'Z'"
(b) Leave the timezone intact and output the UTC offset.
   Using the pattern: "yyyy-MM-dd'T'HH:mm:ssZ"

That way we also have a human and machine readable (and predictable) timestamp.

- Joakim


Kenney Westerhof wrote:
On Tue, 28 Mar 2006, Mike Perham wrote:

Hi,

some thoughts on this:

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

It seems like one way to support this would be:

<configuration>
     <archive>
           <manifestEntries>
              <Build-Time>${now}</Build-Time>
         </manifestEntries>
     </archive>
</configuration>

But we would need to add support for this variable in the POM
interpolation code and it's not clear how to format the Date.  Any other
suggestions?

The archiver itself can add this field in the manifest, no need for
expressions then.

Perhaps re-use the timestamp used on snapshot naming?

The ${now} is rather unprecise; builds can take minutes, what time is
used? Perhaps the 'ctime' of the main artifact?

Btw, it looks like this is some abuse of a versioning scheme. If
non-snapshot versions are used, the version is clear. If snapshots are
used, also clear versions (1.0-YYYYMMDDHHMMSS) are used. I think those
are accessible from pom.properties?

The 'Implementation-Version' manifest entry currently reports the
-SNAPSHOT version; a filled-out SNAPSHOT version could be added
to that too, but I think it's calculated on the moment of deployment.
We would need to define a clear moment when that is calculated, so
on deployment, the filename contains the same version tag as the
manifest entry.

 -- Kenney



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to