diff options
author | mattinger <[email protected]> | 2007-03-05 19:37:57 +0000 |
---|---|---|
committer | mattinger <[email protected]> | 2007-03-05 19:37:57 +0000 |
commit | 6eadd8093b3a132c62d4c0863dbffa39e45993aa (patch) | |
tree | e075f7cc6b25b102e5b103d486c21fb43dd7b73c /src | |
parent | 0fefe647cbfe0e616044f58c241d733f8d56c92a (diff) |
allow import of arbitrary resource (not just build.xml).
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/trunk/ant-contrib@88 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'src')
-rwxr-xr-x | src/java/net/sf/antcontrib/net/URLImportTask.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/java/net/sf/antcontrib/net/URLImportTask.java b/src/java/net/sf/antcontrib/net/URLImportTask.java index e513a8a..e95b53d 100755 --- a/src/java/net/sf/antcontrib/net/URLImportTask.java +++ b/src/java/net/sf/antcontrib/net/URLImportTask.java @@ -74,6 +74,7 @@ public class URLImportTask private String repositoryDir;
private URL ivyConfUrl;
private File ivyConfFile;
+ private String resource = "build.xml";
private String artifactPattern = "/[org]/[module]/[ext]s/[module]-[revision].[ext]";
private String ivyPattern = "/[org]/[module]/ivy-[revision].xml";
private boolean verbose = false;
@@ -118,6 +119,10 @@ public class URLImportTask this.repositoryUrl = repositoryUrl;
}
+ public void setResource(String resource) {
+ this.resource = resource;
+ }
+
public void execute()
throws BuildException {
@@ -244,9 +249,9 @@ public class URLImportTask expand.setSrc(file);
expand.setDest(dir);
expand.perform();
- importFile = new File(dir, "build.xml");
+ importFile = new File(dir, resource);
if (! importFile.exists()) {
- throw new BuildException("Cannot find a 'build.xml' file in " +
+ throw new BuildException("Cannot find a '" + resource + "' file in " +
file.getName());
}
}
|