Check out
http://maven.apache.org/guides/getting-started/index.html#How_do_I_filte
r_resource_files.  That may get you started.

Andrew

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 27, 2008 3:14 PM
> To: [email protected]
> Subject: Text Substitution
> 
> 
> Does maven 2 provide a text substitution feature?
> I've looked through the docs, but not found anything.
> 
> Specifically I would like to copy the version
> (<version>1.0.10</version>) from the pom into a (xml) file
> in our application so the version can be displayed in the
> application.
> 
> Currently we have to manually update both the version in the
> pom and the xml file, which although not difficult is an
> opportunity to make an error if you not paying attention.
> 
> I would be great to be able to place a magic string (e.g.
> {mvn.pom.version} or something) that when mvn is copying
> files to the target directory will replace with the version
> from the pom.
> 
> I guess in general arbitrary string replacement might be
> useful too?
> 
> Cheers and thanks for a great tool
> 
> Simon
> 
> PS: I tried to send this from my work email address but it
> was rejected with:
> 
> Reporting-MTA: dns; mail.metering.co.nz
> 
> Final-recipient: RFC822; [email protected]
> Action: failed
> Status: 5.0.0
> Remote-MTA: dns; apache.org
> X-Supplementary-Info: <apache.org #5.0.0 smtp;552 spam score
> (5.2) exceeded
>  threshold>
> 
> ---------------------------------------------------------------------
> 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