ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: when multiple projects refer to different versions of dependancy, ivy doesn't resolve correctly...
Date Fri, 01 Dec 2006 18:59:47 GMT
On 12/1/06, Prakash Mukkamala <pmukkamala@gmail.com> wrote:
>
> One bug that I found regarding IVY...
>
> I use IVY and really like the product.
>
> I have found one bug in one instance where we have multiple projects....
>
> I have attached the ivy reports...I am thinking that there is a bug in IVY
> thats causing IVY to retrieve both the framework versions...Please
> advice...Thx...
> Prakash Mukkamala, IBM
>
> We have commons, iar, ipf and Framework projects.
>
> *project commons has a dependency on  Framework 1.30 version, iar and ipf*
>
>       ipf has a dependency on Project Framework 1.31
>       iar has a dependency on Project Framework 1.30
>
> What we expected was that framework 1.31 will be used instead of framework
> 1.30, but we IVY picks both the frameworks project in the ivycache...
>

With the dependencies you describe, Ivy should end up with framework 1.31 at
the end of conflict resolution. Evicting 1.30 should ensure that the
artifacts of 1.30 are not downloaded to the cache, but it do not ensure that
the ivy file of 1.30 is not downloaded. Indeed, Ivy can realize that the
1.30 is evicted only after it has resolved the 1.30 dependencies. This
depend on the order of dependencies, but I see no way to be absolutely sure
you'll never download an ivy file which is evicted later.

So, in your case, what does really happen? Are the artifacts of
1.30downloaded? If yes, could you provide your verbose or debug trace?

Xavier

please look at the ivy.xmls of all the projects...
>
> *1.commons ivy.xml file:*
> <ivy-module version="1.4">
>  <info organisation="prminc" module="training-ivy"/>
>  <configurations>
>   <conf name="compile"/>
>   <conf name="war"/>
>   <conf name="ear"/>
>  </configurations>
>  <publications>
>   <artifact name="commons-ejb" type="jar" conf="compile,ear"/>
>      <artifact name="commons-web" type="jar" conf="war"/>
>      <artifact name="commons-web" type="war" conf="war,ear"/>
>  </publications>
>  <dependencies defaultconf="compile,ear->default">
>    <dependency org="eRA" name="framework" rev=" 1.19.30.000" conf="*->@"/>
> <!-- conf="*->@" is equivalent to conf="compile->compile;war->war;ear->ear"
> -->
>      <dependency org="eRA" name="ipf" rev=" latest.integration"
> conf="compile,ear->@"/>
>      <dependency org="eRA" name="iar" rev="latest.integration "
> conf="*->@"/>
>   <dependency org="apache" name="cactus" rev=" 1.3"/>
>  </dependencies>
> </ivy-module>
>
> *1.1 commons build file:*
>  <target name="resolve.all"  depends="clean.ivy.cache"
> description="retrieve dependencies with ivy">
>      <ivy:configure file="${local.conf.dir}/ivyconf.xml"/>
>   <ivy:resolve file="ivy.xml" conf="compile,war,ear"/>
>      <ivy:cachefileset conf="compile" setid="ivy.compile.fileset"/>
>      <ivy:cachefileset conf="war" setid=" ivy.war.fileset.wars"
> type="war"/>
>      <ivy:cachefileset conf="war" setid="ivy.war.fileset.jars"
> type="jar"/>
>      <ivy:cachefileset conf="ear" setid=" ivy.ear.fileset"/>
>     </target>
>
>
> *2.ipf ivy.xml file:*
> <?xml version="1.0"?>
> <ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation=" http://www.jayasoft.org/misc/ivy/ivy.xsd
> ">
>   <info organisation="eRA" module="ipf" revision="1.7.1.2 "
> status="release" publication="20060327182052"/>
>   <configurations>
>     <conf name="compile"/>
>     <conf name="ear"/>
>   </configurations>
>   <publications>
>     <artifact name="ipf-ejb" type="jar" conf="*"/>
>   </publications>
>   <dependencies>
>     <dependency org="eRA" name="framework" rev="1.+" conf="*->@"/>
>   </dependencies>
> </ivy-module>
>
> *3.iar ivy.xml file:*
> <?xml version="1.0"?>
> <ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation=" http://www.jayasoft.org/misc/ivy/ivy.xsd
> ">
>   <info organisation="eRA" module="iar" revision="2.08.04.001 "
> status="release" publication="20061130112906"/>
>   <configurations>
>     <conf name="compile"/>
>     <conf name="war"/> <!-- Artifacts to be included in a parent WAR -->
>     <conf name="ear"/> <!-- Artifacts to be included in a parent EAR -->
>   </configurations>
>   <publications>
>     <artifact name="iar-ejb" type="jar" conf="compile,ear"/>
>     <artifact name="iar-web" type="war" conf="ear"/>
>   </publications>
>   <dependencies defaultconf="*->@"> <!-- conf="*->@" is equivalent to
> conf="compile->compile;war->war;ear->ear" -->
>     <dependency org="eRA" name="framework" rev=" 1.19.30.000"
> conf="*->@"/>
>     <dependency org="eRA" name="sbc" rev=" 1.17.23.000"
> conf="compile,ear->@" transitive="false"> <!-- Do not include transitive
> dependencies to avoid a circular dep. problem with PPF -->
>       <!-- Include only some of the published SBC artifacts -->
>     <artifact name="application-ejb" type="jar" conf="compile,ear"/>
>     <artifact name="grantfolder-ejb" type="jar" conf="compile,ear"/>
>       <artifact name="sbc-ejb" type="jar" conf="compile,ear"/>
>     </dependency>
>     <dependency org="eRA" name="ipf" rev=" 1.7.1.2"
> conf="compile,ear->@"/>
>     <dependency org="apache" name="poi" rev=" 1.5.1"
> conf="compile,ear->default"/>
>   </dependencies>
> </ivy-module>
>
>
> *4.framework ivy.xml file:*
>
> <?xml version="1.0"?>
> <?xml-stylesheet type="text/xsl" href="http://www.jayasoft.fr/org/ivyrep/ivy-doc.xsl
> "?>
> <ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation=" http://www.jayasoft.org/misc/ivy/ivy.xsd
> ">
>   <info organisation="eRA" module="framework" revision="1.19.30.000"
> status="release" publication="20061110112635"/>
>   <configurations>
>     <conf name="compile"/>
>     <conf name="war"/> <!-- Artifacts to be included in a parent WAR -->
>     <conf name="ear"/> <!-- Artifacts to be included in a parent EAR -->
>   </configurations>
>   <publications>
>     <artifact name="framework-ejb" type="jar" conf="compile,ear"/>
>     <artifact name="framework-test" type="jar" conf="compile"/>
>     <artifact name="framework-filters" type="jar" conf="compile,war"/>
>     <artifact name="framework-web" type="jar" conf="compile,war"/>
>     <artifact name="framework-web" type="war" conf="war"/> <!-- Consume it
> in an app's WAR but don't include in an app's EAR -->
>   </publications>
>   <dependencies defaultconf="compile,ear->default">
>     <dependency org="apache" name="struts" rev="1.0.2"
> conf="compile,war->default"/>
>     <dependency org="apache" name="log4j" rev="1.2.13"/>
>     <dependency org="apache" name="jakarta-regexp" rev="1.4"/>
>     <dependency org="apache" name="commons-lang" rev=" 2.1"/>
>     <dependency org="apache" name="jakarta-oro" rev="2.0.7"/>
>     <!-- dependency org="apache" name="xerces" rev="2.0.+"/ -->
>     <dependency org="lowagie" name="iText" rev="1.2"/>
>     <dependency org="enterprisedt" name="ftp" rev="2001.10.09"/>
>     <dependency org="opensymphony" name="quartz" rev=" 1.4.3"/>
>     <dependency org="sun" name="rowset" rev="1.0.1"/>
>     <dependency org="sun" name="rowset-old" rev="2000.06.13"/>
>     <dependency org="sun" name="jce" rev=" 2002.06.27"/>
>     <dependency org="sun" name="jaxb" rev="1.0"/>
>     <dependency org="apache" name="cactus" rev="1.7.2"
> conf="compile,ear,war->server"/>
>     <dependency org="apache" name="commons-httpclient" rev="3.0.1"/>
>     <dependency org="apache" name="commons-logging" rev="1.0.4"/>
>     <dependency org="apache" name="commons-beanutils" rev=" 1.7.0"/>
>
>     <!-- Compile time only: -->
>     <dependency org="drools" name="drools" rev="2.0"
> conf="compile->default"/> <!-- Framework 1 apps are not expected to use
> Drools at runtime (?) -->
>     <dependency org="junit" name="junit" rev="3.7"
> conf="compile->default"/>
>     <dependency org="oracle" name="oc4j" rev="10.1.2"
> conf="compile->default"/>
>     <dependency org="sun" name="jaxp" rev="1.2.6.01"
> conf="compile->default"/>
>   </dependencies>
> </ivy-module>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message