Browse Source

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.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273222 13f79535-47bb-0310-9956-ffa450edef68
master
Erik Hatcher 23 years ago
parent
commit
4f04b8d831
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      src/main/org/apache/tools/ant/types/AbstractFileSet.java

+ 11
- 0
src/main/org/apache/tools/ant/types/AbstractFileSet.java View File

@@ -213,6 +213,17 @@ public abstract class AbstractFileSet extends DataType implements Cloneable,
return defaultPatterns.createExcludesFile();
}

/**
* 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.


Loading…
Cancel
Save