[ http://jira.codehaus.org/browse/MPWAR-27?page=all ]
Jason van Zyl updated MPWAR-27: ------------------------------- Assign To: (was: Jason van Zyl) > Add multiple files to WEB-INF from a merge point directory > ---------------------------------------------------------- > > Key: MPWAR-27 > URL: http://jira.codehaus.org/browse/MPWAR-27 > Project: maven-war-plugin > Type: New Feature > Environment: na > Reporter: Peter Anning > Priority: Minor > Attachments: plugin-patch.txt > > > This feature adds the possibility to include pre-filtered files from a > merge-point directory > It looks for 2 properties: > # the directory to get the files from, you need to make sure this exists > maven.build.mergedir=${maven.build.dir}/merge-point > # a comma delimted list of files to look for > maven.war.webinf.filelist=ws-proxyfactory-config.xml,some-config-file.xml > You would use: > <goal name="filter-before-war-example"> > <mkdir dir="${maven.build.mergedir}"/> > <!-- setup a filterset here ..... --> > <ant:copy > file="${basedir}/src/webapp/WEB-INF/some-config.xml" > tofile="${maven.build.mergedir}/some-config.xml" > filtering="true" > /> > <attainGoal name="war:war"/> > </goal> > below is a cvs diff -u plugin.jelly > Index: plugin.jelly > =================================================================== > RCS file: /home/cvspublic/maven-plugins/war/plugin.jelly,v > retrieving revision 1.42 > diff -u -r1.42 plugin.jelly > --- plugin.jelly 29 Apr 2004 17:05:41 -0000 1.42 > +++ plugin.jelly 14 Jun 2004 16:12:08 -0000 > @@ -17,7 +17,6 @@ > */ > --> > > - > <project xmlns:j="jelly:core" > xmlns:license="license" > xmlns:util="jelly:util" > @@ -132,7 +131,25 @@ > </ant:fileset> > </ant:copy> > </j:if> > + > + <!-- want to independently copy specified files to the WEB-INF diectory > that > + may have been filtered > + --> > + > + <!-- split the list of files up --> > + <util:tokenize var="maven.war.webinf.filelist.split" > delim=",">${maven.war.webinf.filelist}</util:tokenize> > > + <!-- iterate the list --> > + <j:forEach var="file" items="${maven.war.webinf.filelist.split}"> > + <!-- ant:echo>Merge file: ${file}</ant:echo --> > + <util:available file="${maven.build.mergedir}/${file}"> > + <ant:echo>Copying ${maven.build.mergedir}/${file} to > ${webapp.build.webinf}/${file}</ant:echo> > + <ant:copy file="${maven.build.mergedir}/${file}" > + tofile="${webapp.build.webinf}/${file}" > + overwrite="true" /> > + </util:available> > + </j:forEach> > + > <util:available file="${maven.war.webxml}"> > <ant:copy file="${maven.war.webxml}" > tofile="${webapp.build.webinf}/web.xml" -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira