You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gs...@apache.org on 2008/04/14 10:14:40 UTC
svn commit: r647690 -
/ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
Author: gscokart
Date: Mon Apr 14 01:14:35 2008
New Revision: 647690
URL: http://svn.apache.org/viewvc?rev=647690&view=rev
Log:
IVY-372 handle properly the absolute url (was ok for http:// protocol but was failing with file:/ url)
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java?rev=647690&r1=647689&r2=647690&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java Mon Apr 14 01:14:35 2008
@@ -369,7 +369,13 @@
throw new IllegalArgumentException(
"bad include tag: specify file or url to include");
} else {
- settingsURL = new URL(this.settings , propFilePath);
+ try {
+ //First asume that it is an absolute URL
+ settingsURL = new URL(propFilePath);
+ } catch(MalformedURLException e) {
+ //If that fail, it may be because it is a relative one.
+ settingsURL = new URL(this.settings , propFilePath);
+ }
Message.verbose("including url: " + settingsURL.toString());
ivy.setSettingsVariables(settingsURL);
}