Hi!

I created the following 3 files,

ivy-compile.xml
<ivy-module version="1.0">
 <info organisation="jayasoft" module="hello-ivy" />
 <dependencies>
   <dependency org="org.slf4j" name="slf4j-api" rev="1.4.0" />
 </dependencies>
</ivy-module>

ivy-runtime.xml
<ivy-module version="1.0">
 <info organisation="jayasoft" module="hello-ivy" />
 <dependencies>
   <dependency org="org.slf4j" name="slf4j-api" rev="1.4.0" />
   <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.4.0" />
   <dependency org="log4j" name="log4j" rev="1.2.14" />
 </dependencies>
</ivy-module>

build.xml
<project xmlns:ivy="antlib:fr.jayasoft.ivy.ant" name="hello-ivy">
 <target name="resolve">
   <ivy:resolve file="ivy-compile.xml"/>
   <ivy:resolve file="ivy-runtime.xml"/>
 </target>
 <target name="init" depends="resolve">
   <ivy:cachepath pathid="compile.classpath" file="ivy-compile.xml" />
   <pathconvert property="ccp" refid="compile.classpath" />
   <echo message="${ccp}" />
   <ivy:cachepath pathid="runtime.classpath" file="ivy-runtime.xml" />
   <pathconvert property="rcp" refid="runtime.classpath" />
   <echo message="${rcp}" />
 </target>
</project>


When run > ant init, it resolved the dependencies and created
compile-time and runtime classpath, and printed the classpaths to the
console.

I was expecting that the compile-time classpath will contain Only
slf4-api-1.4.0.jar. However, both classpaths contains the same number
of JARs:


    [echo] C:\Documents and
Settings\hez\.ivy\cache\org.slf4j\slf4j-api\jars\slf4j-api-1.4.0.jar;C:\Documents
and 
Settings\hez\.ivy\cache\org.slf4j\slf4j-log4j12\jars\slf4j-log4j12-1.4.0.jar;C:\Documents
and Settings\hez\.ivy\cache\log4j\log4j\jars\log4j-1.2.14.jar

    [echo] C:\Documents and
Settings\hez\.ivy\cache\org.slf4j\slf4j-api\jars\slf4j-api-1.4.0.jar;C:\Documents
and 
Settings\hez\.ivy\cache\org.slf4j\slf4j-log4j12\jars\slf4j-log4j12-1.4.0.jar;C:\Documents
and Settings\hez\.ivy\cache\log4j\log4j\jars\log4j-1.2.14.jar



Do you think this is OK?


--

Hez

Reply via email to