Re: how can I to use build time in pom files

2008-01-22 Thread Rex Huang
yes, this is work, but I don't know why it can't transfer this value via
properties.

Rex

On Jan 21, 2008 7:17 PM, Mick Knutson [EMAIL PROTECTED] wrote:

 actually, why can't you just add ${buildNumber} to your Versions.txt ???


 On Jan 21, 2008 10:17 AM, Mick Knutson [EMAIL PROTECTED] wrote:

  Add this to your filter.properties:
 
  BUILDTIME=${buildNumber}
 
 
 
  On Jan 21, 2008 9:10 AM, Rex Huang [EMAIL PROTECTED] wrote:
 
   yah, use buildnumber-maven-plugin may be better.
   one strange thing is I can't use ${buildNumber} in filter,
   when I want to replace $BUILDTIME in the resource file.
   such as:
   in pom.xml
  properties
  BUILDTIME${buildNumber}/BUILDTIME
  /properties
  
resource
  directorysrc/main/resources/directory
  filteringtrue/filtering
  includes
  includeVersion.txt/include
  /includes
/resource
  
   in Version.txt
   build-time= ${BUILDTIME}
  
 
 
 
  --
  Thanks,
  Mick Knutson
 
  http://www.baselogic.com
  http://www.blincmagazine.com
  http://www.djmick.com
  http://www.myspace.com/mickknutson
  http://www.myspace.com/BLiNCMagazine
  http://tahoe.baselogic.com
  ---




 --
 Thanks,
 Mick Knutson

 http://www.baselogic.com
 http://www.blincmagazine.com
 http://www.djmick.com
 http://www.myspace.com/mickknutson
 http://www.myspace.com/BLiNCMagazine
 http://tahoe.baselogic.com
 ---



Re: how can I to use build time in pom files

2008-01-21 Thread Rex Huang
I found information of maven-buildnumber-plugin here:
http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html
it's works!

Rex

On Jan 18, 2008 3:33 PM, Mark Eramo [EMAIL PROTECTED] wrote:

 Rex,
   Have a look at the Maven build number plugin. It may be able to do
 what you need.

 *http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html*

 Regards,
 Mark


 Rex Huang wrote:
  Does maven has build time property, which I can use in pom files
  my-property${build time}my-property
 
  BR//Rex
 
 

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




RE: how can I to use build time in pom files

2008-01-21 Thread nicklist
The newer version of this plugin is found here:

http://mojo.codehaus.org/buildnumber-maven-plugin/

And the artifacts can also be found on central:

http://mvnrepository.com/artifact/org.codehaus.mojo/buildnumber-maven-plugin

Hth,

Nick Stolwijk


-Original Message-
From: Rex Huang [mailto:[EMAIL PROTECTED]
Sent: Mon 1/21/2008 5:02 PM
To: Maven Users List
Subject: Re: how can I to use build time in pom files
 
I found information of maven-buildnumber-plugin here:
http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html
it's works!

Rex

On Jan 18, 2008 3:33 PM, Mark Eramo [EMAIL PROTECTED] wrote:

 Rex,
   Have a look at the Maven build number plugin. It may be able to do
 what you need.

 *http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html*

 Regards,
 Mark


 Rex Huang wrote:
  Does maven has build time property, which I can use in pom files
  my-property${build time}my-property
 
  BR//Rex
 
 

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





Re: how can I to use build time in pom files

2008-01-21 Thread Mick Knutson
!-- ===--
!-- Build Number Plugin --
!-- ===--
!--
This mojo is designed to get a unique build number for each
time you build your project. So while your version may
remain
constant at 1.0-SNAPSHOT for many iterations until release,
you
will have a build number that can uniquely identify each
build
during that time. The build number is obtained from scm, and
in
particular, at this time, from svn. You can then place that
build number in metadata, which can be accessed from your
app,
if desired.

The mojo also has a couple of extra functions to ensure you
get
the proper build number. First, your local repository is
checked to make sure it is up to date. Second, your local
repository is automatically updated, so that you get the
latest
build number. Both these functions can be suppressed, if
desired.

Optionally, you can configure this mojo to produce a
revision
based on a timestamp, or on a sequence, without requiring
any
interaction with an SCM system. Note that currently, the
only
supported SCM is subversion.

http://mojo.codehaus.org/buildnumber-maven-plugin/
--
!-- ===--
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdbuildnumber-maven-plugin/artifactId
version1.0-beta-1-SNAPSHOT/version
executions
execution
phasevalidate/phase
goals
goalcreate/goal
/goals
/execution
/executions
configuration
doCheckfalse/doCheck
doUpdatefalse/doUpdate
format{0,date,-MM-dd HH:mm:ss}/format
items
itemtimestamp/item
/items
/configuration
/plugin


Re: how can I to use build time in pom files

2008-01-21 Thread Rex Huang
yah, use buildnumber-maven-plugin may be better.
one strange thing is I can't use ${buildNumber} in filter,
when I want to replace $BUILDTIME in the resource file.
such as:
in pom.xml
properties
BUILDTIME${buildNumber}/BUILDTIME
/properties

  resource
directorysrc/main/resources/directory
filteringtrue/filtering
includes
includeVersion.txt/include
/includes
  /resource

in Version.txt
build-time= ${BUILDTIME}


Re: how can I to use build time in pom files

2008-01-21 Thread Mick Knutson
Add this to your filter.properties:

BUILDTIME=${buildNumber}


On Jan 21, 2008 9:10 AM, Rex Huang [EMAIL PROTECTED] wrote:

 yah, use buildnumber-maven-plugin may be better.
 one strange thing is I can't use ${buildNumber} in filter,
 when I want to replace $BUILDTIME in the resource file.
 such as:
 in pom.xml
properties
BUILDTIME${buildNumber}/BUILDTIME
/properties

  resource
directorysrc/main/resources/directory
filteringtrue/filtering
includes
includeVersion.txt/include
/includes
  /resource

 in Version.txt
 build-time= ${BUILDTIME}




-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---


Re: how can I to use build time in pom files

2008-01-21 Thread Mick Knutson
actually, why can't you just add ${buildNumber} to your Versions.txt ???


On Jan 21, 2008 10:17 AM, Mick Knutson [EMAIL PROTECTED] wrote:

 Add this to your filter.properties:

 BUILDTIME=${buildNumber}



 On Jan 21, 2008 9:10 AM, Rex Huang [EMAIL PROTECTED] wrote:

  yah, use buildnumber-maven-plugin may be better.
  one strange thing is I can't use ${buildNumber} in filter,
  when I want to replace $BUILDTIME in the resource file.
  such as:
  in pom.xml
 properties
 BUILDTIME${buildNumber}/BUILDTIME
 /properties
 
   resource
 directorysrc/main/resources/directory
 filteringtrue/filtering
 includes
 includeVersion.txt/include
 /includes
   /resource
 
  in Version.txt
  build-time= ${BUILDTIME}
 



 --
 Thanks,
 Mick Knutson

 http://www.baselogic.com
 http://www.blincmagazine.com
 http://www.djmick.com
 http://www.myspace.com/mickknutson
 http://www.myspace.com/BLiNCMagazine
 http://tahoe.baselogic.com
 ---




-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---


Re: how can I to use build time in pom files

2008-01-18 Thread Mark Eramo

Rex,
  Have a look at the Maven build number plugin. It may be able to do 
what you need.


*http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html*

Regards,
Mark


Rex Huang wrote:

Does maven has build time property, which I can use in pom files
my-property${build time}my-property

BR//Rex

  


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



Re: how can I to use build time in pom files

2008-01-18 Thread amit kumar
You can use buildnumber-maven-plugin, for this but i was able to have
date+time... tried only time format but it wasn't running. If this solves
your purpose lemme know, I will share the relevant portion of my pom.

On Jan 18, 2008 7:58 PM, Rex Huang [EMAIL PROTECTED] wrote:

 Does maven has build time property, which I can use in pom files
 my-property${build time}my-property

 BR//Rex