Sorry - I just re-read what I sent and it's not too clear. Let's say you
have an externally-governed final artifact name, comprised of a
constant, your department's name (I know, stretching it a bit but it's
just an example) and a build number: 

<finalName>my-thingy-${department-name}-${buildNumber}</finalName>

These can be passed in to maven on the command line:

mvn -Ddepartment-name=TheDepartmentOfTheMachineThatGoesPing
-DbuildNumber=4

Which would result in a final artifact called 

my-thingy-TheDepartmentOfTheMachineThatGoesPing-4

Whatever you use to kick off your install or deploy (Cruise Control,
Pulse, TeamCity, etc) would have to supply these values somehow.

Kevan.


-----Original Message-----
From: Kevan Dunsmore [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 24, 2007 11:13 AM
To: Maven Users List
Subject: RE: How to customize artifact name with the current timestamp?

The thing that springs to mind is for you to provide a final name that
contains your custom values. Cruise Control, for example, passes the
environment variable "label" to maven builds. You could customize the
output by doing this:

<finalName>my-thingy-${project.version}-${label}</finalName>

If you couple that with this:

<properties>
        <label>0</label>
</properties>

Then anything that builds with no supplied label value will be defaulted
to 0. Otherwise you could invoke it with this:

mvn -Dlabel=<your label here> clean install


Is that what you're looking for?

Kevan.


-----Original Message-----
From: Aliaksandr Radzivanovich [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 24, 2007 10:52 AM
To: users@maven.apache.org
Subject: How to customize artifact name with the current timestamp?

Is it possible with Maven 2 to install/deploy artifact snapshots with
customized version number '${project.id}-YYYYMMDD.hhmmss.jar' as
described in http://maven.apache.org/maven-1.x/plugins/jar/goals.html
?

Cheers,
ARa

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


This e-mail message, including any attachments, is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information that is protected from disclosure. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message and any attachments.


---------------------------------------------------------------------
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]

Reply via email to