ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimenez Coelho, Juan " <>
Subject Configuring repositories - trouble with CLASSPATH ?
Date Thu, 18 Feb 2010 13:40:27 GMT
I am taking my first steps with Ivy and I need to point my shared repository to an existing
Maven 2 repository in the filesystem.

This is what I have done so far:

1.- Copied ivy2.jar to lib directory of my Ant v1.8 installation
2.- Created the following directory %ANT_HOME%\lib\org\apache\ivy\core\settings
3.- Under that directory I copied ivysettings.xml that I found in ivy2.jar and changed its
contents to be:

    <settings defaultResolver="default"/>
    <include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
    <include file="C:/Java/apache-ant-1.8.0RC1/lib/org/apache/ivy/core/settings/ivysettings-shared.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>

Where ANT_HOME=C:/Java/apache-ant-1.8.0RC1

4.- I created file C:/Java/apache-ant-1.8.0RC1/lib/org/apache/ivy/core/settings/ivysettings-shared.xml

5.- Before running ANT, I set CLASSPATH to be C:\Java\apache-ant-1.8.0RC1\lib

The result is almost right in the sense that ivy finds my 'overridden' ivysettings.xml but
it then fails to find ivysettings-public.xml.  I expected it to search the complete CLASSPATH
trying to find that file (just as ANT itself is correctly finding all the classes it needs)

This is the output I am getting on the sample app:

Buildfile: C:\temp\ivy\example\hello-ivy\build.xml

[ivy:retrieve] :: Ivy 2.1.0 - 20090925235825 :: ::
[ivy:retrieve] :: loading settings :: url = file:/C:/Java/apache-ant-1.8.0RC1/lib/org/apache/ivy/core/settings/ivysettings.xml

C:\temp\ivy\example\hello-ivy\build.xml:41: impossible to configure ivy:settings with given
url: file:/C:/Java/apache-ant-1.8.0RC1/lib/org/apache/ivy/core/settings/ivysettings.xml :
java.text.ParseException: failed to load settings from file:/C:/Java/apache-ant-1.8.0RC1/lib/org/apache/ivy/core/settings/ivysettings.xml:
io problem while parsing config file: C:\Java\apache-ant-1.8.0RC1\lib\org\apache\ivy\core\settings\ivysettings-public.xml
(The system cannot find the file specified)
        at org.apache.ivy.core.settings.XmlSettingsParser.doParse(
        at org.apache.ivy.core.settings.XmlSettingsParser.parse(
        at org.apache.ivy.core.settings.IvySettings.load(
        at org.apache.ivy.Ivy.configure(

Given the above, how to I tell Ivy to keep looking in the classpath?  After all, ivysettings-public.xml
can be found in ivy2.jar



View raw message