You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by "Maarten Coene (JIRA)" <ji...@apache.org> on 2007/09/21 11:27:50 UTC
[jira] Created: (IVY-607) Add new variable "ivy.settings.base.url"
which is independent from the way the settings file is loaded/included
Add new variable "ivy.settings.base.url" which is independent from the way the settings file is loaded/included
---------------------------------------------------------------------------------------------------------------
Key: IVY-607
URL: https://issues.apache.org/jira/browse/IVY-607
Project: Ivy
Issue Type: Improvement
Components: Core
Affects Versions: 2.0.0-alpha-2
Reporter: Maarten Coene
The value of this ivy.settings.dir variable depends on how the settings are loaded.
For instance:
{code}
Ivy ivy = new Ivy();
ivy.configure(new File("C:/test/ivysettings.xml"));
{code}
will set the value of the ivy.settings.dir to "C:/test".
However, if you configure Ivy like this:
{code}
Ivy ivy = new Ivy();
ivy.configure(new File("C:/test/ivysettings.xml").toURL());
{code}
you'll end up with an ivy.settings.dir variable with value "file:C:/test"
This makes a big difference in the way you can use the ivy.settings.dir variable!
For instance, a lot of the Ivy junit tests will fail if we configure Ivy with the URL instead of the File.
Another example, consider the following ivysettings.xml file:
{code}
<ivysettings>
<include url="${ivy.settings.dir}/ivy-shared-resolver.xml"/>
</ivysettings>
{code}
This will only work if you configure Ivy with an URL. If you configure Ivy with a File, it won't work anymore, unless you use the "file" attribute to include the other settings file, or add "file:" befoire the ivy.settings.dir variable.
To solve this problem we could introduce a new variable: ivy.settings.base.url which points to the same path of ivy.settings.dir, but which is always an url and can always be used as value of the url attribute.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.