ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liya Katz <l...@tikalk.com>
Subject problem with transitive dependencies
Date Mon, 20 Jul 2009 14:30:05 GMT
Hi,

My client's project has pure java modules that are built with maven and
mixed modules that are built with Ant and Ivy. Since developers feel more
comfortable with maven,
they publish all artifacts to the local maven repository.
When i have an Ivy module A that depends on Ivy module B, which has more
dependencies, module A don't get them.
the resolver in ivy.settings:
<filesystem name="local-maven-ivy" m2compatible="true" >
        <artifact
pattern="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
/>
 </filesystem>

the dependency in ivy.xml of module B (cmc-fix-common is A) is:
<dependency org="cmc.ivy" name="cmc-fix-common" rev="${project.version}"
conf="build->default">
            <artifact name="
" type="jar"/>
            <artifact name="cmc-fix-common-sb-resources" type="sb-resources"
ext="zip"/>
        </dependency>

in debug log i see:
[ivy:resolve]     no ivy file in cache for cmc.ivy#cmc-fix-common;1.1.0:
tried C:\Documents and
Settings\lkatz\.ivy2\cache\cmc.ivy\cmc-fix-common\ivy-1.1.0.xml
[ivy:resolve]     no ivy file in cache for cmc.ivy#cmc-fix-common;1.1.0:
tried C:\Documents and
Settings\lkatz\.ivy2\cache\cmc.ivy\cmc-fix-common\ivy-1.1.0.xml
[ivy:resolve]      trying C:\Documents and
Settings\lkatz/.m2/repository/cmc/ivy/cmc-fix-common/1.1.0/cmc-fix-common-1.1.0.jar
[ivy:resolve]         tried C:\Documents and
Settings\lkatz/.m2/repository/cmc/ivy/cmc-fix-common/1.1.0/cmc-fix-common-1.1.0.jar
[ivy:resolve]     local-maven-ivy: no ivy file found for
cmc.ivy#cmc-fix-common;1.1.0: using default data

it says that ivy.xml is not found while it is there! I mean it is
"c:\Documents and
Settings\lkatz\.m2\repository\cmc\ivy\cmc-fix-common\1.1.0\ivy-1.1.0.xml"
so the build fails in compilation since it has missing class in its
classpath from missing transitive dependency.

I tried to define pattern for ivy files, and get even wierder results:
resolver is ivy.settings:
<filesystem name="local-maven-ivy" m2compatible="true">
        <ivy
pattern="${user.home}/.m2/repository/[organisation]/[module]/[revision]/ivy-[revision].xml"
/>
       <artifact
pattern="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
/>
</filesystem>

the build failed saying:
[ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]           ::          UNRESOLVED DEPENDENCIES         ::
[ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]           :: cmc.ivy#cmc-fix-common;1.1.0: configuration not
found in cmc.ivy#cmc-fix-common;1.1
.0: 'default'. It was required from cmc.ivy#cmc-xxx;1.1.0 build
[ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::

in debug.log:

[ivy:resolve] prophet-ivy: Checking cache for: dependency:
cmc.ivy#cmc-fix-common;1.1.0 {build=[default]}
[ivy:resolve]     no ivy file in cache for cmc.ivy#cmc-fix-common;1.1.0:
tried C:\Documents and
Settings\lkatz\.ivy2\cache\cmc.ivy\cmc-fix-common\ivy-1.1.0.xml
[ivy:resolve]     no ivy file in cache for cmc.ivy#cmc-fix-common;1.1.0:
tried C:\Documents and
Settings\lkatz\.ivy2\cache\cmc.ivy\cmc-fix-common\ivy-1.1.0.xml
[ivy:resolve]      trying C:\Documents and
Settings\lkatz/.m2/repository/cmc/ivy/cmc-fix-common/1.1.0/ivy-1.1.0.xml
[ivy:resolve]         tried C:\Documents and
Settings\lkatz/.m2/repository/cmc/ivy/cmc-fix-common/1.1.0/ivy-1.1.0.xml
[ivy:resolve]     local-maven-ivy: found md file for
cmc.ivy#cmc-fix-common;1.1.0
[ivy:resolve]         => C:\Documents and
Settings\lkatz\.m2\repository\cmc\ivy\cmc-fix-common\1.1.0\ivy-1.1.0.xml
(1.1.0)
[ivy:resolve]     parser = ivy parser
[ivy:resolve]     no ivy file in cache for cmc.ivy#cmc-fix-common;1.1.0:
tried C:\Documents and
Settings\lkatz\.ivy2\cache\cmc.ivy\cmc-fix-common\ivy-1.1.0.xml
[ivy:resolve] downloading C:\Documents and
Settings\lkatz\.m2\repository\cmc\ivy\cmc-fix-common\1.1.0\ivy-1.1.0.xml ...
[ivy:resolve]     local-maven-ivy: downloading C:\Documents and
Settings\lkatz\.m2\repository\cmc\ivy\cmc-fix-common\1.1.0\ivy-1.1.0.xml
[ivy:resolve]         to C:\Documents and
Settings\lkatz\.ivy2\cache\cmc.ivy\cmc-fix-common\ivy-1.1.0.xml.original.part
[ivy:resolve] sha1 file found for C:\Documents and
Settings\lkatz\.m2\repository\cmc\ivy\cmc-fix-common\1.1.0\ivy-1.1.0.xml:
checking...
[ivy:resolve]     local-maven-ivy: downloading C:\Documents and
Settings\lkatz\.m2\repository\cmc\ivy\cmc-fix-common\1.1.0\ivy-1.1.0.xml.sha1
[ivy:resolve]         to C:\DOCUME~1\lkatz\LOCALS~1\Temp\ivytmp17393sha1
[ivy:resolve] sha1 OK for C:\Documents and
Settings\lkatz\.m2\repository\cmc\ivy\cmc-fix-common\1.1.0\ivy-1.1.0.xml
[ivy:resolve]     [SUCCESSFUL ]
cmc.ivy#cmc-fix-common;1.1.0!ivy.xml(ivy.original) (16ms)
[ivy:resolve] post 1.3 ivy file: using exact as default matcher
[ivy:resolve]     default-cache: parsed downloaded md file for
cmc.ivy#cmc-fix-common;1.1.0; parsed=cmc.ivy#cmc-fix-common;1.1.0
[ivy:resolve]     checking cmc.ivy#cmc-fix-common;1.1.0 from local-maven-ivy
against [none]
[ivy:resolve]     module revision kept as first found:
cmc.ivy#cmc-fix-common;1.1.0 from local-maven-ivy
[ivy:resolve]     found cmc.ivy#cmc-fix-common;1.1.0 in local-maven-ivy
[ivy:resolve] problem : configuration not found in
cmc.ivy#cmc-fix-common;1.1.0: 'default'. It was required from
cmc.ivy#cmc-xxx;1.1.0 build

can anyone please explain that?
it found ivy.xml, copied it to the cache, i can see the file in the cache
"c:\Documents and
Settings\lkatz\.ivy2\cache\cmc.ivy\cmc-fix-common\ivy-1.1.0.xml", it is
identical to the module's original ivy.xml with all its dependencies. So why
does it say "[ivy:resolve] problem : configuration not found in
cmc.ivy#cmc-fix-common;1.1.0: 'default'."?

later in debug.log:
[ivy:resolve] Sort dependencies of : cmc.ivy#cmc-fix-common;1.1.0 / Number
of dependencies = 5

correct number of dependencies!

and then again:
[ivy:resolve] :::: WARNINGS
[ivy:resolve]         ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]         ::          UNRESOLVED DEPENDENCIES         ::
[ivy:resolve]         ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]         :: cmc.ivy#cmc-fix-common;1.1.0: configuration not
found in cmc.ivy#cmc-fix-common;1.1.0: 'default'. It was required from
cmc.ivy#cmc-xxx;1.1.0 build
[ivy:resolve]         ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]

Any suggestions?

Thanks a lot in advance!





-----
regards,
Liya Katz
ALM Tools Group Leader
www.tikalk.com
e-mail: liya@tikalk.com
mobile: +972544299477

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