SF.net SVN: ant-contrib: [116] trunk/ant-contrib/src/java/net/sf/antcontrib /net/URLImportTask.java
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <[email protected]> |
Revision: 116
http://svn.sourceforge.net/ant-contrib/?rev=116&view=rev
Author: mattinger
Date: 2007-04-25 10:56:47 -0700 (Wed, 25 Apr 2007)
Log Message:
-----------
Recognize relative file: based urls, and use the ant project's basedir
as the starting point.
Modified Paths:
--------------
trunk/ant-contrib/src/java/net/sf/antcontrib/net/URLImportTask.java
Modified: trunk/ant-contrib/src/java/net/sf/antcontrib/net/URLImportTask.java
===================================================================
--- trunk/ant-contrib/src/java/net/sf/antcontrib/net/URLImportTask.java 2007-04-25 14:47:27 UTC (rev 115)
+++ trunk/ant-contrib/src/java/net/sf/antcontrib/net/URLImportTask.java 2007-04-25 17:56:47 UTC (rev 116)
@@ -123,7 +123,12 @@
configure.init();
if (ivyConfUrl != null) {
if (ivyConfUrl.getProtocol().equalsIgnoreCase("file")) {
- configure.setFile(new File(ivyConfUrl.getPath()));
+ String path = ivyConfUrl.getPath();
+ File f = new File(path);
+ if (! f.isAbsolute()) {
+ f = new File(getProject().getBaseDir(), path);
+ }
+ configure.setFile(f);
}
else {
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/