@@ -4892,7 +4892,7 @@ then the war file myapp.war
created with
<exclude name="jdbc1.jar" />
</lib>
<classes dir="build/main" />
- <fileset dir="src/graphics/images/gifs"
+ <prefixedfileset dir="src/graphics/images/gifs"
prefix="images"/>
</war>
@@ -4937,13 +4937,15 @@ if basedir
is set. You may use any mixture of the implicit file set
and optional subelements like <include>
); explicit nested
<fileset>
elements so long as at least one fileset total is specified. The ZIP file will
only reflect the relative paths of files within each fileset.
-Inside of <zip>
elements, <prefixedfileset>
s (a extended form of filesets) may include one of two special attributes:
+
<zip>
elements may contain both regular <fileset>
elements
+and also <prefixedfileset>
elements. A <prefixedfileset>
is an extended form of a fileset,
+which may include one of two special attributes:
prefix or fullpath. These attributes modify the location of the files when they are placed
-inside the archive. If the prefix attribute is set, all the files in the fileset are prefixed
-with that path in the archive. If the fullpath attribute is set, the file described by the filset is placed at that
-exact location in the archive. (The fullpath attribute can only be set for filesets that
+inside the archive. If the prefix attribute is set, all the files in the prefixedfileset are prefixed
+with that path in the archive. If the fullpath attribute is set, the file described by the prefixedfileset is placed at that
+exact location in the archive. (The fullpath attribute can only be set for prefixedfilesets that
represent a single file. The prefix and fullpath attributes cannot both be set on the
-same fileset.)
+same prefixedfileset.)
The whenempty
parameter controls what happens when no files match.
If skip
(the default), the ZIP is not created and a warning is issued.
If fail
, the ZIP is not created and the build is halted with an error.
@@ -5034,8 +5036,8 @@ are zipped, and files with the name todo.html
are excluded.
current directory. ChangeLog.txt
will be added to the top of the ZIP file, just as if
it had been located at htdocs/manual/ChangeLog.txt
.
<zip zipfile="${dist}/manual.zip">
- <fileset dir="htdocs/manual" prefix="docs/user-guide"/>
- <fileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/>
+ <prefixedfileset dir="htdocs/manual" prefix="docs/user-guide"/>
+ <prefixedfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/>
</zip>
zips all files in the htdocs/manual
directory into the docs/user-guide
directory
in the archive, and also adds the file ChangeLog27.txt
in the