maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curtis Rueden <ctrue...@wisc.edu>
Subject Re: adding timestamp to locally built snapshots
Date Tue, 18 Sep 2012 15:39:56 GMT
Hi Chad,

If your artifacts are JARs, one perhaps less disruptive option is to add a
timestamp to the JAR manifest:

  <properties>
    <!-- NB: Specify formatting of the maven.build.timestamp property. -->

<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
  </properties>
  ...
  <plugin>
    <artifactId>maven-jar-plugin</artifactId>
    <version>2.4</version>
    <configuration>
      <archive>
        <manifestEntries>
          <!-- Add a formatted timestamp for the build. -->

<Implementation-Date>${maven.build.timestamp}</Implementation-Date>
        </manifestEntries>
      </archive>
    </configuration>
  </plugin>

Then you can use a script to dump the "Implementation-Date" entry from the
JAR's manifest.

Regards,
Curtis


On Tue, Sep 18, 2012 at 10:00 AM, Davis, Chad <Chad.Davis@emc.com> wrote:

> I frequently deploy artifacts that I build locally to some of my dev
> environment servers.  Later I have trouble figuring out which one of my
> local dev builds I'm looking at in a given dev environment; this is because
> they are all named "blahblah-SNAPSHOT.run"
>
> So, I'd like to add a timestamp to that, just like what occurs when during
> the deploy of that same artifact to nexus, but:
>
> 1) I don't know how
>
> 2) I don't know if it would cause other troubles
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message