ehatcher 2002/08/14 07:28:00
Modified: src/main/org/apache/tools/ant/types AbstractFileSet.java
Log:
Why this has not been done before is beyond me, but its something I can't
live without! :)
I typically have properties that refer to a JAR file, but its very difficult
to construct a fileset to copy it or include it in a WAR/EAR - so this change
fixes this. <fileset file="${some.jar}"/>
If this change is ok with everyone I'll take care of documenting it.
Revision Changes Path
1.10 +11 -0
jakarta-ant/src/main/org/apache/tools/ant/types/AbstractFileSet.java
Index: AbstractFileSet.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/AbstractFileSet.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AbstractFileSet.java 25 Jul 2002 15:21:21 -0000 1.9
+++ AbstractFileSet.java 14 Aug 2002 14:28:00 -0000 1.10
@@ -214,6 +214,17 @@
}
/**
+ * Creates a single file fileset.
+ */
+ public void setFile(File file) {
+ if (isReference()) {
+ throw tooManyAttributes();
+ }
+ setDir(file.getParentFile());
+ setIncludes(file.getName());
+ }
+
+ /**
* Appends <code>includes</code> to the current list of include
* patterns.
*
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>