I've got a project that needs to create environment specific (i.e. the data in web.xml & associated files varies) war files. As suggested in the war plugin docs I've created a postgoal on war:webapp that does a replace on the files in ${maven.war.webapp.dir}
This works great the 1st time, but the 2nd time only works for the substitutions in web.xml. So I dug out the definition of war:webapp and can see what the cause is: <j:if test="${webSourcesPresent == 'true'}"> <ant:copy todir="${maven.war.webapp.dir}"> <ant:fileset dir="${maven.war.src}" includes="${maven.war.src.includes}" excludes="${maven.war.src.excludes}"> </ant:fileset> </ant:copy> </j:if> <util:available file="${maven.war.webxml}"> <ant:copy file="${maven.war.webxml}" tofile="${webapp.build.webinf}/web.xml" overwrite="true" /> </util:available> namely that web.xml is copied with overwrite = true, but everything else isn't. So the 2nd time round only web.xml gets copied over and so replace is acting on files that have already had the tokens substituted. Is this variation in the overwrite setting by design? If so can anyone suggest a work-around many thanks James ------------------------------------------------------------------------ For more information about Barclays Capital, please visit our web site at http://www.barcap.com. Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. ------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]