ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cody Casterline <>
Subject Building a Repo -- Excludes Question
Date Tue, 24 May 2011 23:11:42 GMT
I'm looking into switching to Ivy for managing our dependencies and I was
happy to find this page:
which describes how to create a local repository using ivy:install so that
builds don't have to hit the network.  (Yay!)

I grabbed
started tweaking it to test my understanding, but I'm running into a
couple issues.

First, my dependencies:

                <dependency org="commons-io" name="commons-io" rev="1.4"/>
                <dependency org="org.apache.cxf"
name="cxf-rt-frontend-jaxws" rev="2.4.0">
                        <exclude org="javax.activation"/>

I've also switched ivysettings-basic.xml to use the local repository
('my-repository') by default.  (It doesn't seem that ivy:resolve or
ivy:retrieve accept a resolver name as an option?  is ivy:install the only
place where you can specify resolvers by name?)

        <settings       defaultCache="${ivy.cache.dir}/no-namespace"
                        defaultConflictManager="all" />
                <filesystem name="my-repository">
                <ibiblio name="libraries" m2compatible="true" />

My thinking is that I can define my dependencies, then try a build.  if the
build can't resolve a dependency from my local repo, I can run ivy:install
to install that dep. locally and try again.  This way I can iteratively
build up my local repo.

when I run ivy:install on org.apache.cxf#cxf-rt-frontend-jaxws;2.4.0, it
installs lots of dependencies but fails with:

[ivy:install] :: problems summary ::
[ivy:install] :::: WARNINGS
[ivy:install]           [NOT FOUND  ]
javax.activation#activation;1.0.2!activation.jar (128ms)
[ivy:install]   ==== libraries: tried
[ivy:install]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install]           ::              FAILED DOWNLOADS            ::
[ivy:install]           :: ^ see resolution messages for details  ^ ::
[ivy:install]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install]           :: javax.activation#activation;1.0.2!activation.jar
[ivy:install]           ::::::::::::::::::::::::::::::::::::::::::::::

... despite the fact that when I look at the ivy files in my repo, and the
pom files on, they claim to exclude javax.activation.

If I uncomment the extra exclude rule above, ivy:resolve will work.  Why
does my exclude work where the ones in pom and ivy files didn't?

Also, while I've got everyone's attention, is there an easier way to just
tell Ivy to install all dependencies for a project into a repository?   If
I've got them listed in ivy.xml, entering them manually into ivy:install
commands seems redundant.  :)


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