Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Environment:na
-
Number of attachments :
Description
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="$
<!-- 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=",">$
</util:tokenize>
+ <!-- iterate the list -->
+ <j:forEach var="file" items="$
">
+ <!-- ant:echo>Merge file: $
+ <util:available file="${maven.build.mergedir}/${file}
">
+ <ant:echo>Copying $
+ <ant:copy file="${maven.build.mergedir}
/$
{file}"+ tofile="${webapp.build.webinf}/${file}
"
+ overwrite="true" />
+ </util:available>
+ </j:forEach>
+
<util:available file="$
<ant:copy file="${maven.war.webxml}
"
tofile="$
/web.xml"
cvs diff -u plugin.jelly