diff options
author | mattinger <[email protected]> | 2006-08-24 17:56:52 +0000 |
---|---|---|
committer | mattinger <[email protected]> | 2006-08-24 17:56:52 +0000 |
commit | 5b21408ad2acd7b9d13165343ede63b36897ed04 (patch) | |
tree | 9450ec8a4d9a2d45be0aaf8664e51a660cad7b3f /src/java | |
parent | 75fb4207b9d66589dc9b94bdf1b04ab700ae3c35 (diff) |
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/trunk/ant-contrib@43 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'src/java')
-rwxr-xr-x | src/java/net/sf/antcontrib/net/URLImportTask.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/java/net/sf/antcontrib/net/URLImportTask.java b/src/java/net/sf/antcontrib/net/URLImportTask.java index 4d4663e..030c494 100755 --- a/src/java/net/sf/antcontrib/net/URLImportTask.java +++ b/src/java/net/sf/antcontrib/net/URLImportTask.java @@ -16,6 +16,9 @@ package net.sf.antcontrib.net;
import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.text.ParseException;
import java.util.Date;
import org.apache.tools.ant.BuildException;
@@ -55,6 +58,8 @@ public class URLImportTask private String type = "jar";
private String repositoryUrl;
private String repositoryDir;
+ private URL ivyConfUrl;
+ private File ivyConfFile;
private String artifactPattern = "/[org]/[module]/[ext]s/[module]-[revision].[ext]";
private String ivyPattern = "/[org]/[module]/ivy-[revision].xml";
@@ -70,6 +75,14 @@ public class URLImportTask this.rev = rev;
}
+ public void setIvyConfFile(File ivyConfFile) {
+ this.ivyConfFile = ivyConfFile;
+ }
+
+ public void setIvyConfUrl(URL ivyConfUrl) {
+ this.ivyConfUrl = ivyConfUrl;
+ }
+
public void execute()
throws BuildException {
@@ -96,6 +109,28 @@ public class URLImportTask repositoryDir + "/" + ivyPattern
);
}
+ else if (ivyConfUrl != null) {
+ try {
+ ivy.configure(ivyConfUrl);
+ }
+ catch (IOException e) {
+ throw new BuildException(e);
+ }
+ catch (ParseException e) {
+ throw new BuildException(e);
+ }
+ }
+ else if (ivyConfFile != null) {
+ try {
+ ivy.configure(ivyConfFile);
+ }
+ catch (IOException e) {
+ throw new BuildException(e);
+ }
+ catch (ParseException e) {
+ throw new BuildException(e);
+ }
+ }
else {
resolver = new IvyRepResolver();
}
|