Thanks, I'll give it another try Julian.
The workaround is holding together though and has proven pretty reliable in
terms of getting ant properties into the filtering phase :)
----- Original Message -----
From: "Julian Wood" <[EMAIL PROTECTED]>
To: "Maven Users List" <users@maven.apache.org>
Sent: Wednesday, May 31, 2006 5:34 PM
Subject: Re: date in manifest
It works fine for me. Did you configure it to use a timestamp rather than
scm? It won't check scm at all if configured like that. Try this:
1. mvn archetype:create -DgroupId=ca.ucalgary.commons -DartifactId=test
2. Add this to your pom:
<repositories>
<repository>
<id>tlc-snapshots</id>
<name>TLC Snapshot Development Repository</name>
<url>http://commons.ucalgary.ca/pub/m2-snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>tlc-snapshots</id>
<name>TLC Snapshot Development Repository</name>
<url>http://commons.ucalgary.ca/pub/m2-snapshots</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>maven-buildnumber-plugin</artifactId>
<version>0.9.2-SNAPSHOT</version>
<configuration>
<format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
<items>
<item>timestamp</item>
</items>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation- Build>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
3. mvn buildnumber:create package
4. Check out the Implementation-Build property in META-INF/ MANIFEST.MF
inside of test-1.0-SNAPSHOT.jar
J
On 31-May-06, at 1:17 AM, Kieran Brady wrote:
I tried te build number plugins without any success as it didn't seem
happy to create a timestamp independently of SCM? I'm using CVS and it
wasn't happy with it..
Instead I have this horrible hack! Our Maven setup seems to be an ever
expanding collection of horrible hacks :-/
[...]
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>create-timestamp-file</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<tstamp>
<format property="time" pattern="dd.MM.yyyy-
HH.mm" locale="en" />
</tstamp>
<property name="timestamp" value="${time}-$
{user.name}" />
<touch file=".build.timestamp.properties" />
<echo file=".build.timestamp.properties"
append="false" message="timestamp=${timestamp}" />
</tasks>
</configuration>
</execution>
<execution>
<id>delete-timestamp-file</id>
<phase>clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete file=".build.timestamp.properties" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
[...]
and
[...]
<filters>
[...]
<filter>.build.timestamp.properties</filter>
</filters>
----- Original Message ----- From: "Julian Wood" <[EMAIL PROTECTED]>
To: "Maven Users List" <users@maven.apache.org>
Sent: Tuesday, May 30, 2006 10:43 PM
Subject: Re: date in manifest
You can use the maven-buildNumber-plugin.
http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/ howto.html
Near the bottom it tells you how to use a timestamp.
There was some talk of making the build date a more globally available
property (negating the need for this plugin), but I don't know what it
is, or if it was done.
J
On 30-May-06, at 2:03 PM, [EMAIL PROTECTED] wrote:
Hi All
If i want to make entry of build date to mani-fest files how do i do
that?
i know how to make entry to mani-fest but don't know what maven
variable
has the value for date ??
Anyone knows it , please advise?
Thanks,
Raghu
--
Julian Wood <[EMAIL PROTECTED]>
Software Engineer
Teaching & Learning Centre
University of Calgary
http://tlc.ucalgary.ca
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Julian Wood <[EMAIL PROTECTED]>
Software Engineer
Teaching & Learning Centre
University of Calgary
http://tlc.ucalgary.ca
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]