You can replace tokens using filters in Maven2. It will replace
${your-token-here} in your source files with properties defined in
your pom or profile.

This is covered in detail in the Maven book mentioned numerous times
on this mailing list. Review section 2.6.2 "Filtering Classpath
Resources".

Wayne

On 6/9/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
Hi All

Is that possible to filter and modify the xml file using any plugin???


Like i have the following code snippet in my ant build.xml, which i will
run from command line as "ant -Denv=sit <target_name>"
       1. copy my.xml as data.xml into /tmp dir
       2. then using filter token, i will replace the value of
"retryConnectionFactory" with the properties i defined in build.xml

   <copy file="my.xml"
     tofile="tmp/data.xml"
     overwrite="true">
     <filterset>
       <filter token="retryConnectionFactory"
value="${${env}_retryConnectionFactory}"/>
       <filter token="retryQueueDestination"
value="${{${env}_retryQueueDestination}"/>
     </filterset>
   </copy>

is there a way to do it in maven using any plugin??
[EMAIL PROTECTED] dont want to use the same ant code in maven2

Please advise

Thanks,
Raghu



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

Reply via email to