OK, I found a couple of things, but I need to do the following:
I have an xml configuration file from Spring, that I need to replace a token
in, depending upong the type of build i.e: "maven.target.build=jboss", or
"maven.target.build=was51"
I want to replace this token only when I add it to the war.
So here is what I found, and I am not sure how to modify this to get it to
replace what I need:
<postGoal name="war:webapp">
<j:set var="targetBuild" value="${maven.target.build}"/>
<j:if test="${targetBuild == 'jboss'}">
<ant:replace
file="${basedir}/conf/web/xml/applicationContext-hibernate.xml">
<ant:replacefilter token="[APPSRVR_JNDI_TOKEN]"
value="${jboss.jndi.token}"/>
</ant:replace>
</j:if>
<j:if test="${targetBuild == 'was51'}">
<ant:replace
file="${basedir}/conf/web/xml/applicationContext-hibernate.xml">
<ant:replacefilter token="[APPSRVR_JNDI_TOKEN]"
value="${was51.jndi.token}"/>
</ant:replace>
</j:if>
</postGoal>
But is this going to replace this token just prior to adding this file to
the war?
Thank You
Mick Knutson
Sr. Java/J2EE Consultant
BASE logic, inc.
(415) 648-1804 (S.F., CA)
http://www.BASELogic.com
HP Consulting Services (Walnut Creek, CA)
From: "Mick Knutson" <[EMAIL PROTECTED]>
Reply-To: "Maven Users List" <users@maven.apache.org>
To: users@maven.apache.org
Subject: Need Maven example of ant replace task please...
Date: Tue, 23 Aug 2005 09:38:57 -0700
I am trying to use the ant replace task function in my Maven build and want
to see if anyone can help me with an example.
Thank You
Mick Knutson
Sr. Java/J2EE Consultant
BASE logic, inc.
(415) 648-1804 (S.F., CA)
http://www.BASELogic.com
HP Consulting Services (Walnut Creek, CA)
---------------------------------------------------------------------
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]