ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject Re: Configuring repositories - trouble with CLASSPATH ?
Date Thu, 18 Feb 2010 21:34:26 GMT
Hi,

I did not read everything but it is bad practice to set the CLASSPATH env var before starting
ant.

Antoine
-------- Original-Nachricht --------
> Datum: Thu, 18 Feb 2010 13:40:27 +0000
> Von: "Jimenez Coelho, Juan " <juan.jimenezcoelho@citi.com>
> An: "ivy-user@ant.apache.org" <ivy-user@ant.apache.org>
> Betreff: Configuring repositories - trouble with CLASSPATH ?

> 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:
> 
> <ivysettings>
>     <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"/>
> </ivysettings>
> 
> 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
> 
> resolve:
> [ivy:retrieve] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/
> ::
> [ivy:retrieve] :: loading settings :: url =
> file:/C:/Java/apache-ant-1.8.0RC1/lib/org/apache/ivy/core/settings/ivysettings.xml
> 
> BUILD FAILED
> 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(XmlSettingsParser.java:165)
>         at
> org.apache.ivy.core.settings.XmlSettingsParser.parse(XmlSettingsParser.java:150)
>         at
> org.apache.ivy.core.settings.IvySettings.load(IvySettings.java:408)
>         at org.apache.ivy.Ivy.configure(Ivy.java:422)
> 
> 
> 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
> 
> Thanks
> 
> Juan

Mime
View raw message