Thanks Greg/Tony -- works like a charm. Jim (not Kim)
-----Original Message----- From: Tony Ambrozie [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 10:14 PM To: Maven Users List Subject: Re: Can I get a timestamp? I am using the buildnumber plugin successfully to tag my assembly releases with a timestamp (for example, for assembly, <finalName>${ project.artifactId}-${project.version}-r${buildNumber}</finalName>), just as Greg suggested. Need to make sure to invoke the plugin create goal, for example mvn buildnumber:create assembly:assembly. Thanks' On 2/6/07, Greg Jones <[EMAIL PROTECTED]> wrote: > > Kim, > > You can use the maven-buildnumber-plugin to get a timestamp, as follows: > > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>maven-buildnumber-plugin</artifactId> > <version>0.9.4</version> > <configuration> > <format>{0,date,yyyy-MM-dd HH:mm:ss}</format> > <items> > <item>timestamp</item> > </items> > <doCheck>false</doCheck> > <doUpdate>false</doUpdate> > </configuration> > <executions> > <execution> > <phase>validate</phase> > <goals> > <goal>create</goal> > </goals> > </execution> > </executions> > </plugin> > > The timestamp is put into the ${buildNumber} property. You can also > adjust the format of the timestamp to suit your requirements. Take a > look at > http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.htm > lfor > information on how it works. > > Regards, > > Greg J. > > -----Original Message----- > From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 7 February 2007 11:03 AM > To: 'Maven Users List' > Subject: RE: Can I get a timestamp? > > The plug-in will allow you to use timestamp tagging to tag your > builds. I am sorry but I don't think you can access the timestamp > property directly in the pom itself. Why do you need to do that > anyway? > > Bashar > > -----Original Message----- > From: Crossley, Jim [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 06, 2007 4:43 PM > To: Maven Users List > Subject: RE: Can I get a timestamp? > > Thanks for the quick reply, but what does that do, exactly? In which > property does it make the timestamp available? I tried ${timestamp} > after adding that snippet to my pom, but it was empty. What am I missing? > > Thanks, > Jim > > -----Original Message----- > From: Bashar Abdul Jawad [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 06, 2007 6:15 PM > To: 'Maven Users List' > Subject: RE: Can I get a timestamp? > > You can use maven scm plugin: > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-scm-plugin</artifactId> > <configuration> > <addTimestamp>true</addTimestamp> > <tag>build</tag> > <timestampFormat>yyyyMMddHHmm</timestampFormat> > </configuration> > </plugin> > > -----Original Message----- > From: Crossley, Jim [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 06, 2007 3:57 PM > To: Maven Users List > Subject: Can I get a timestamp? > > Do I really have to write an entire plugin just to make a timestamp > available as a maven property? That's what Google is telling me, but > I wanted to make sure before I went to all that trouble. > > Thanks, > Jim > > --------------------------------------------------------------------- > 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] > > --------------------------------------------------------------------- > 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] > > > --------------------------------------------------------------------- > 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]