You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Joshua Tharp <jo...@alumni.calpoly.edu> on 2009/04/22 01:19:22 UTC

Configurations and Ivy file confusion

Serious ivy newbie alert

I am utterly baffled by the configuration mechanism with Ivy. If I leave
everything in the default configuration things work pretty much as I would
expect. However, I'm trying to set up one of my modules to be used only as a
build tool in another (i.e. I don't want it to be part of the second
module's delivery).

I have one module called antlib that contains my build tool:
antlib/ivy.xml
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module
    version="2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd
">

<info
    organisation="com.mycompany.tools"
    module="antlib">
  <description>
    A collection of ant scripts that are pieced together for an actual
build.
  </description>
</info>
</ivy-module>

Now I only want this module to be used as part of the build in another
module, not transitive. So I thought I could declare a configuration in my
other Ivy file that used the first.
dfm/ivy.xml
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module
    version="2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd
">
<info
    organisation="com.mycompany.dfm"
    module="dfm">
  <description>The DFM</description>
</info>

<configurations>
  <conf
      name="default"
      visibility="public" />
  <conf
      name="antlib"
      visibility="private" />
</configurations>

<dependencies>
  <dependency
      org="com.mycompany.tools"
      name="antlib"
      rev="0.3.+"
      conf="antlib" />
</dependencies>

</ivy-module>

When I build and deploy antlib on my PC then everything seems to work fine.
However, when I have my CruiseControl system publish antlib then my
configured resolver errors out on the shared one.
ivysettings.xml
<?xml version="1.0" encoding="UTF-8"?>
<ivysettings>
  <settings defaultResolver="default" />

  <property
      name="ivy.local.default.root"
      value="${ivy.default.ivy.user.dir}/local"
      override="false" />
  <property
      name="ivy.local.default.ivy.pattern"
      value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
      override="false" />
  <property
      name="ivy.local.default.artifact.pattern"
      value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
      override="false" />

  <property
      name="repo.root"
      value="http://internal.system/repository" />
  <property
      name="module.pat"
      value="[organisation]/[module]/[revision]" />
  <property
      name="ivy.pat"
      value="ivy-[revision].xml" />
  <property
      name="artifact.pat"
      value="[module]-[revision].[ext]" />

  <resolvers>
    <filesystem
        name="local"
        checkmodified="true"
        changingMatcher="regexp"
        changingPattern=".*_SNAPSHOT">
      <ivy
pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern}" />
      <artifact
pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern}" />
    </filesystem>

    <url name="shared">
      <ivy pattern="${repo.root}/${module.pat}/${ivy.pat} "/>
      <artifact pattern="${repo.root}/${module.pat}/${artifact.pat}" />
    </url>

    <filesystem
        name="shared-repository"
        local="true">
      <ivy pattern="${ivy.publish.d}/${module.pat}/${ivy.pat} "/>
      <artifact pattern="${ivy.publish.d}/${module.pat}/${artifact.pat}" />
    </filesystem>
  </resolvers>

  <include url="${ivy.default.settings.dir}/ivysettings-public.xml" />
  <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml" />
  <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"
/>
</ivysettings>

I use the shared-repository resolver to publish the artifacts with my
CruiseControl setup and use the shared one to get them back out on my PC.

I've poured through the configurations, default configurations, and inline
configurations documentation... I must be missing something pretty basic
here.

Here is the part of my build script that is calling Ivy
      <ivy:settings
          file="${my.ivy.settings.file}"
          id="ivy.instance" />

      <ivy:info />

      <ivy:retrieve
          conf="antlib"
          pattern="${lib.d}/antlib.jar" />

Here is the error I get when I try to resolve against the repository.
[ivy:retrieve]  public: no ivy file nor artifact found for
com.mycompany.tools#antlib;0.3.+
[ivy:retrieve]  found com.mycompany.tools#antlib;0.3.11 in shared
[ivy:retrieve]  [0.3.11] com.mycompany.tools#antlib;0.3.+
[ivy:retrieve]  resolved ivy file produced in C:\Documents and
Settings\jlt\.ivy2\cache\resolved-com.mycompany.dfm-dfm-working@Hawk.xml
[ivy:retrieve] :: downloading artifacts ::
[ivy:retrieve] :: resolution report :: resolve 437ms :: artifacts dl 0ms

---------------------------------------------------------------------
        |                  |            modules            ||   artifacts
|
        |       conf       | number| search|dwnlded|evicted||
number|dwnlded|

---------------------------------------------------------------------
        |      antlib      |   1   |   0   |   0   |   0   ||   0   |   0
|

---------------------------------------------------------------------
[ivy:retrieve] WARN:    ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] WARN:    ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve] WARN:    ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] WARN:    :: com.mycompany.tools#antlib;0.3.11: configuration
not found in com.mycompany.tools#antlib;0.3.11: 'antlib'. It was required
from com.mycompany.dfm#dfm;working@Hawk antlib
[ivy:retrieve] WARN:    ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]  report for com.mycomany.dfm#dfm;working@Hawk antlib produced
in C:\Documents and
Settings\jlt\.ivy2\cache\com.mycompany.dfm-dfm-antlib.xml
[ivy:retrieve]  resolve done (437ms resolve - 0ms download)
[ivy:retrieve]
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          :: com.mycompany.tools#antlib;0.3.11: configuration
not found in com.mycompany.tools#antlib;0.3.11: 'antlib'. It was required
from com.mycompany.dfm#dfm;working@Hawk antlib
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
   [subant] Exiting C:\Documents and Settings\jlt\.ant\bootstrap.xml.

BUILD FAILED
D:\co\dfm\cc-boot-build.xml:21: The following error occurred while executing
this line:
C:\Documents and Settings\jlt\.ant\bootstrap.xml:12: The following error
occurred while executing this line:
jar:file:/C:/Documents%20and%20Settings/jlt/.ant/lib/bootstrap.jar!/com/mycompany/bootstrap/antlib.xml:38:
impossible to resolve dependencies:
        resolve failed - see output for details
        at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
... lots more stack trace...

Thanks for your time,

Josh

Re: Configurations and Ivy file confusion

Posted by Joshua Tharp <jo...@alumni.calpoly.edu>.
If I change my dependency mapping from "antlib->default" to "antlib->*" it
works in both places.

I don't get why "antlib->default" fails.

On Wed, Apr 22, 2009 at 7:21 AM, Joshua Tharp <
joshua-tharp@alumni.calpoly.edu> wrote:

> My problem (partly persisting by the way, I was apparently a little too
> quick to declare victory) seems to be with a difference in the way things
> are being resolved by my local resolver and my shared one. I can get it to
> resolve against one, but not both.
>
> In my antlib ivy.xml I have:
> <?xml version="1.0" encoding="UTF-8"?>
> <ivy-module
>     version="2.0"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:noNamespaceSchemaLocation="
> http://ant.apache.org/ivy/schemas/ivy.xsd">
>
> <info
>     organisation="com.mycompany.tools"
>     module="antlib">
>   <description>
>     A collection of ant scripts that are pieced together for an actual
> build.
>   </description>
> </info>
>
> </ivy-module>
>
> And in my using ivy.xml I've got
> <?xml version="1.0" encoding="UTF-8"?>
> <ivy-module
>     version="2.0"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:noNamespaceSchemaLocation="
> http://ant.apache.org/ivy/schemas/ivy.xsd">
> <info
>     organisation="com.mycompany.dfm"
>     module="dfm">
>   <description>The DFM</description>
> </info>
>
> <configurations>
>   <conf
>       name="default"
>       visibility="public" />
>   <conf
>       name="antlib"
>       visibility="private"
>       transitive="false" />
> </configurations>
>
> <dependencies>
>   <dependency
>       org="com.mycompany.tools"
>       name="antlib"
>       rev="0.3.+"
>       conf="antlib->default" />
> </dependencies>
>
> </ivy-module>
>
>
> This combination resolves against my shared repository, but not against my
> local one. With the local repository I get the error:
> [ivy:retrieve] :: resolving dependencies ::
> com.mycompany.dfm#dfm;working@Hawk
> [ivy:retrieve]  confs: [antlib]
> [ivy:retrieve]  found com.mycompany.tools#antlib;0.3.21_SNAPSHOT in local
> [ivy:retrieve]  [0.3.21_SNAPSHOT] com.mycompany.tools#antlib;0.3.+
> [ivy:retrieve] :: resolution report :: resolve 94ms :: artifacts dl 0ms
>
> ---------------------------------------------------------------------
>         |                  |            modules            ||   artifacts
> |
>         |       conf       | number| search|dwnlded|evicted||
> number|dwnlded|
>
> ---------------------------------------------------------------------
>         |      antlib      |   1   |   1   |   1   |   0   ||   0   |   0
> |
>
> ---------------------------------------------------------------------
> [ivy:retrieve]
> [ivy:retrieve] :: problems summary ::
> [ivy:retrieve] :::: WARNINGS
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          :: com.mycompany.tools#antlib;0.3.21_SNAPSHOT:
> configuration not found in com.mycompany.tools#antlib;0.3.21_SNAPSHOT:
> 'default'. It was required from com.mycompany.dfm#dfm;working@Hawk antlib
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]
> [ivy:retrieve]
> [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
>
> BUILD FAILED
> D:\co\dfm\cc-boot-build.xml:21: The following error occurred while
> executing this line:
> C:\Documents and Settings\jlt\.ant\bootstrap.xml:12: The following error
> occurred while executing this line:
> jar:file:/C:/Documents%20and%20Settings/jlt/.ant/lib/bootstrap.jar!/com/att/csar/bootstrap/antlib.xml:38:
> impossible to resolve dependencies:
>         resolve failed - see output for details
>
> Total time: 0 seconds
>
>
> But when I resolve against the shared resolver:
> [ivy:retrieve] :: resolving dependencies ::
> com.mycompany.dfm#dfm;working@Hawk
> [ivy:retrieve]  confs: [antlib]
> [ivy:retrieve]  found com.mycompany.tools#antlib;0.3.20 in shared
> [ivy:retrieve]  [0.3.20] com.mycompany.tools#antlib;0.3.+
> [ivy:retrieve] downloading
> http://internal.server/repository/com.mycompany.tools/antlib/0.3.20/antlib-0.3.20.jar...
> [ivy:retrieve] .. (7kB)
> [ivy:retrieve] .. (0kB)
> [ivy:retrieve]  [SUCCESSFUL ] com.mycompany.tools#antlib;0.3.20!antlib.jar
> (32ms)
>
> [ivy:retrieve] :: resolution report :: resolve 531ms :: artifacts dl 47ms
>
> ---------------------------------------------------------------------
>         |                  |            modules            ||   artifacts
> |
>         |       conf       | number| search|dwnlded|evicted||
> number|dwnlded|
>
> ---------------------------------------------------------------------
>         |      antlib      |   1   |   1   |   0   |   0   ||   1   |   1
> |
>
> ---------------------------------------------------------------------
> [ivy:retrieve] :: retrieving :: com.mycompany.dfm#dfm
> [ivy:retrieve]  confs: [antlib]
>
> BUILD SUCCESSFUL
>
>
>
> So if there are some common gotchas that might lead to this behavior, I'd
> appreciate a pointer.
>
> Josh
>
>
>
>
> On Wed, Apr 22, 2009 at 7:02 AM, Tom <tb...@tbee.org> wrote:
>
>> Good for you, it also took me the better part of the afternoon to get a
>> working ivy.xml. I would suggest providing some more tutorials around the
>> configuration concept.
>>
>> Just to clarify: right now I'm trying to setup different collections of
>> jars for building and testing. E.g. I have a set with jars that are required
>> for building, which differs from the runtime set and from the test set.
>>
>> For example:
>> - runtime = log4j, commons this, commons that, framework here, ...
>> - build = runtime + servlet.api (servlet api is provided by the container,
>> so not part of the deliverable/runtime, but required for compiling the
>> sources)
>> - test = runtime + junit, hsqldb
>>
>> In the end it is simple, but never the less... Since this maybe is a
>> common setup, it might make a good example.
>>
>>
>>
>>
>>
>>
>> Joshua Tharp wrote:
>>
>>> Nevermind. I think I figured out what I was doing wrong.
>>>
>>> On Tue, Apr 21, 2009 at 4:19 PM, Joshua Tharp <
>>> joshua-tharp@alumni.calpoly.edu> wrote:
>>>
>>>
>>>
>>>> Serious ivy newbie alert
>>>>
>>>> I am utterly baffled by the configuration mechanism with Ivy.
>>>>
>>>
>>
>

Re: Configurations and Ivy file confusion

Posted by Tom <tb...@tbee.org>.
As said: I do not have my head around the whole configuration concept. 
So my answer would be: I don't know.

All I know is that I have four dependency rules, which results in 93 
jars. Then after adding configuration to the ivy.xml I only get 78. I'm 
totally in the dark as to why.

Tom





Joshua Tharp wrote:
> Were those extra 15 jars part of a different configuration than the one you
> depend on (which is the default conf in all four cases)?
>
> On Wed, Apr 22, 2009 at 7:41 AM, Tom <tb...@tbee.org> wrote:
>
>   
>> I also have the problem that it is not working as expected. Using the
>> following ivy.xml:
>>
>> /<?xml version="1.0"?>
>> <ivy-module version="2.0" xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="
>> http://ant.apache.org/ivy/schemas/ivy.xsd">
>>   <info organisation="nl.knowledgeplaza" module="kpprofiler-service"
>> revision="0.1"/>
>>   <dependencies>
>>       <dependency org="org.codehaus.enunciate" name="enunciate-rt"
>> rev="1.10"/>             <dependency org="org.codehaus.enunciate"
>> name="enunciate-core" rev="1.10" /> <!-- also contains the ant task -->
>>         <dependency org="junit" name="junit" rev="4.5"/>         <dependency
>> org="org.liquibase" name="liquibase-core" rev="1.9.2"/>      </dependencies>
>> </ivy-module>
>>
>>
>> /And the running "<ivy:retrieve/>" results in 93 jars being downloaded,
>> amongst which are "activation-1.1.jar" and "jaxb-api-2.1.jar". Now, I wanted
>> to split these up according to usage:
>>
>> /<?xml version="1.0"?>
>> <ivy-module version="2.0" xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="
>> http://ant.apache.org/ivy/schemas/ivy.xsd">
>>   <info organisation="nl.knowledgeplaza" module="kpprofiler-service"
>> revision="0.1"/>
>>   <configurations>
>>       <conf name="runtime" description="runtime"/>
>>       <conf name="build" description="for building"/>
>>       <conf name="test" description="for testing our framework"/>
>>   </configurations>
>>     <dependencies>
>>       <dependency org="org.codehaus.enunciate" name="enunciate-rt"
>> rev="1.10" conf="runtime->default"/>             <dependency
>> org="org.codehaus.enunciate" name="enunciate-core" rev="1.10"
>> conf="build->default"/>
>>       <dependency org="junit" name="junit" rev="4.5" conf="test->default"/>
>>         <dependency org="org.liquibase" name="liquibase-core" rev="1.9.2"
>> conf="test->default"/>      </dependencies>
>> </ivy-module>
>> /
>>
>> Now I want to run three ivy-retrieves instead of one:
>>
>> /        <ivy:retrieve conf="runtime"
>> pattern="lib/[artifact]-[revision].[ext]"/>
>>       <ivy:retrieve conf="test"
>> pattern="lib-test/[artifact]-[revision].[ext]"/>
>>       <ivy:retrieve conf="build"
>> pattern="lib-ext/[artifact]-[revision].[ext]"/>
>> /
>>
>> Instead of 93 now 78 jars are being downloaded and a.o.
>> "activation-1.1.jar" and "jaxb-api-2.1.jar" are missing. I do not
>> understand! The same happens if I just do a "<ivy:retrieve/>": 78 jars. Same
>> dependencies... One of these dependency must be referring to the missing
>> jars. How can they be missing?
>>
>> Tom
>>
>>     
>
>   


Re: Configurations and Ivy file confusion

Posted by Joshua Tharp <jo...@alumni.calpoly.edu>.
Were those extra 15 jars part of a different configuration than the one you
depend on (which is the default conf in all four cases)?

On Wed, Apr 22, 2009 at 7:41 AM, Tom <tb...@tbee.org> wrote:

> I also have the problem that it is not working as expected. Using the
> following ivy.xml:
>
> /<?xml version="1.0"?>
> <ivy-module version="2.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="
> http://ant.apache.org/ivy/schemas/ivy.xsd">
>   <info organisation="nl.knowledgeplaza" module="kpprofiler-service"
> revision="0.1"/>
>   <dependencies>
>       <dependency org="org.codehaus.enunciate" name="enunciate-rt"
> rev="1.10"/>             <dependency org="org.codehaus.enunciate"
> name="enunciate-core" rev="1.10" /> <!-- also contains the ant task -->
>         <dependency org="junit" name="junit" rev="4.5"/>         <dependency
> org="org.liquibase" name="liquibase-core" rev="1.9.2"/>      </dependencies>
> </ivy-module>
>
>
> /And the running "<ivy:retrieve/>" results in 93 jars being downloaded,
> amongst which are "activation-1.1.jar" and "jaxb-api-2.1.jar". Now, I wanted
> to split these up according to usage:
>
> /<?xml version="1.0"?>
> <ivy-module version="2.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="
> http://ant.apache.org/ivy/schemas/ivy.xsd">
>   <info organisation="nl.knowledgeplaza" module="kpprofiler-service"
> revision="0.1"/>
>   <configurations>
>       <conf name="runtime" description="runtime"/>
>       <conf name="build" description="for building"/>
>       <conf name="test" description="for testing our framework"/>
>   </configurations>
>     <dependencies>
>       <dependency org="org.codehaus.enunciate" name="enunciate-rt"
> rev="1.10" conf="runtime->default"/>             <dependency
> org="org.codehaus.enunciate" name="enunciate-core" rev="1.10"
> conf="build->default"/>
>       <dependency org="junit" name="junit" rev="4.5" conf="test->default"/>
>         <dependency org="org.liquibase" name="liquibase-core" rev="1.9.2"
> conf="test->default"/>      </dependencies>
> </ivy-module>
> /
>
> Now I want to run three ivy-retrieves instead of one:
>
> /        <ivy:retrieve conf="runtime"
> pattern="lib/[artifact]-[revision].[ext]"/>
>       <ivy:retrieve conf="test"
> pattern="lib-test/[artifact]-[revision].[ext]"/>
>       <ivy:retrieve conf="build"
> pattern="lib-ext/[artifact]-[revision].[ext]"/>
> /
>
> Instead of 93 now 78 jars are being downloaded and a.o.
> "activation-1.1.jar" and "jaxb-api-2.1.jar" are missing. I do not
> understand! The same happens if I just do a "<ivy:retrieve/>": 78 jars. Same
> dependencies... One of these dependency must be referring to the missing
> jars. How can they be missing?
>
> Tom
>

Re: Configurations and Ivy file confusion

Posted by Archie Cobbs <ar...@gmail.com>.
Think of it this way:

Rule #1: A configuration is just a name for some subset of a module's
artifacts.

Rule #2: A dependency defind in module A's ivy.xml that looks like:

        <dependency name="B" conf="foo->bar"/>

simply states that "when someone is asking for the artifacts in
configuration 'foo' of module A, then we'll also need the artifacts in
configuration 'bar' of module B".

Hope that helps.

-Archie

On Wed, Apr 22, 2009 at 12:10 PM, Tom <tb...@tbee.org> wrote:

>
>  In this case, you're relying on Ivy's default configuration mapping, which
>> I believe is "*->*", which means you'll get all of the artifacts (jars)
>> defined by *any* of the dependency's configurations.
>>
>
> Ok. I do not understand what that means, but ok.
>
>
>  Now you have limited the artifacts to those defined by the "default"
>> configuration of each dependency. That probably doesn't include jars from
>> configs like "test", "sources", etc.
>>
>
> I have tried "runtime->*" but that did not change anything.
>
>
>
>  Configuration mapping has been the most confusing part of Ivy for me. I
>> still haven't mastered the use of it to come up with a best practices within
>> our organization.
>>
>
> May I put on the table that if a feature is this complicated to use, that
> maybe there is a flaw in the underlying concept? I still do not understand
> what configurations are trying to do. Are they:
> - trying to bind dependencies to usages? (The dependency is used within the
> scope "test", or "runtime", as I'm trying to do now)
> - trying to bind dependencies to deliverables? (For the deliverable
> "xyz.jar", use dependencies...)
>
> I also did not find a concept of "configuration" in Maven. Let's look at
> this from a simplistic approach:
> 1. my four dependency lines are resolved by Ivy to a list of 93 jars.
> 2. the only thing I can do with this list is limited / filter, I cannot
> expand it any further
> 3. so appearantly the configuration allows applying a filter to this list
> 4. you must filter on some attribute that is assigned to each jar... where
> would that assignment take place?
> 5. the jar itself could have that attribute set, but the developer can't
> know for what the jar is used.
> 6. the only logical place to assign a value would be in de ivy.xml in the
> project using it, inheriting from the initial line
>
> Where am I going wrong?
>
>
>
>
>


-- 
Archie L. Cobbs

Re: Configurations and Ivy file confusion

Posted by Kirby Files <kf...@masergy.com>.
Tom wrote on 04/23/2009 12:23 PM:
> Ok. Just to verify if I have got it right. If I say in my ivy.xml:
>
> <dependency name="slf4j" conf="runtime->core,log4j"/>
>
> Then in slf4j there is:
>
> <conf name="log4j" visibility="public" />
> <dependency name="log4j" conf="log4j->some-log4j-id"/>
>
> And again log4j there would be a:
>
> <conf name="some-log4j-id" visibility="public" />
> <dependency name="another" conf="some-log4j-id"/>
>
> Is this the way the cascading is linked?

Yup, that's about it. In this case, slf4j happens to use the default 
configuration for log4j, but the config looks like you specify it above.

> Are there also any deliverables or artifacts (what are they called
> again) lines?

Yes, each module declares its "publications", which include the ivy 
files and the artifacts (jars). Each jar it publishes can be published 
under one or more of the above configurations. So the slf4j-api.jar is 
published in the "core" config, and the slf4j-log4j12.jar is published 
in the log4j config:

<publications>
[...]
         <artifact name="slf4j-api" conf="core"/>
         <artifact name="slf4j-log4j12" conf="default, log4j"/>
</publications>

Thanks,
   --kirby

Re: Configurations and Ivy file confusion

Posted by Tom <tb...@tbee.org>.
> A module defines one or more configurations, which will be used to 
> meet different needs. For example, the logging framework slf4j defines 
> a "core" configuration, which includes only the API jar. It then has a 
> configs for each implementation choice a user might want, "log4j", 
> "jul", "jcl", etc.
>

Ok. Just to verify if I have got it right. If I say in my ivy.xml:

    <dependency name="slf4j" conf="runtime->core,log4j"/>


Then in slf4j there is:

    <conf name="log4j" visibility="public" />
    <dependency name="log4j" conf="log4j->some-log4j-id"/>


And again log4j there would be a:

    <conf name="some-log4j-id" visibility="public" />
    <dependency name="another" conf="some-log4j-id"/>


Is this the way the cascading is linked?
Are there also any deliverables or artifacts (what are they called 
again) lines?

Tom

Re: Configurations and Ivy file confusion... AHA!

Posted by Tom <tb...@tbee.org>.
>> OK, many projects have source and jar artifacts with the same name, 
>> so you really want to either set a retrieve pattern which includes 
>> the type of the artifact for disambiguation. If you cannot do this, 
>> you'll need to specify an exclusion rule for your dependencies to 
>> only include type jar. Here are examples of both:
>>
>>         <ivy:retrieve 
>> pattern="${ivy.lib.dir}/[type]/[artifact]-[revision].[ext]" 
>> haltonfailure="true" conf="build" sync="true"/>
>>
>>         <dependencies>
>>           <exclude type="source"/>
>>         </dependencies>
>>

Yes. Finally. I get it. The pattern, more specifically the omitting of 
[type], causes two different files to be copied to the same destination 
(enunciate-rt.jar and enunciate-rt-sources.jar) .

Re: Configurations and Ivy file confusion

Posted by Tom <tb...@tbee.org>.
> This is because the default ivy retrieve pattern is a bit more complex than the pattern you have specified.
> The default pattern is: "lib/[artifact]-[revision](-[classifier]).[ext]"
>
>   

Yes. Thanks. Setting it to "lib/[artifact]-[revision]-[type].[ext]" got 
me all jar-jar banks, because all jars got a "-jar" in the name as well.

The classifier variable is not documented?

    http://ant.apache.org/ivy/history/2.1.0-rc1/use/retrieve.html
    http://ant.apache.org/ivy/history/trunk/concept.html



Re: Configurations and Ivy file confusion

Posted by Maarten Coene <ma...@yahoo.com>.
This is because the default ivy retrieve pattern is a bit more complex than the pattern you have specified.
The default pattern is: "lib/[artifact]-[revision](-[classifier]).[ext]"

Maarten




----- Original Message ----
From: Tom <tb...@tbee.org>
To: ivy-user@ant.apache.org
Sent: Friday, April 24, 2009 9:54:36 AM
Subject: Re: Configurations and Ivy file confusion


>> OK, many projects have source and jar artifacts with the same name, so you really want to either set a retrieve pattern which includes the type of the artifact for disambiguation. If you cannot do this, you'll need to specify an exclusion rule for your dependencies to only include type jar. Here are examples of both:

I cannot quite wrap my head around this (I've used your configurations). Now, using:

   <ivy:retrieve/>


/ivy-retrieve:
    [echo] Ivy is fetching all dependencies and copying them into the lib dir..
.
No ivy:settings found for the default reference 'ivy.instance'.  A default insta
nce will be used
[ivy:retrieve] :: Ivy 2.1.0-rc1 - 20090319213629 :: http://ant.apache.org/ivy/ :
:
:: loading settings :: file = C:\Documents and Settings\toeu\My Documents\kp\pro
filer\kpprofiler2\components\service\ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: nl.knowledgeplaza#kpprofiler-service
;0.1
[ivy:retrieve]  confs: [default, runtime, compile, test, sources, javadocs]
[ivy:retrieve]  *found org.codehaus.enunciate#enunciate-rt;1.10 in public*
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-core-rt;1.10 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-core-annotations;1.10 in
public
[ivy:retrieve]  found xfire#xfire-jsr181-api;1.0-M1 in public
[ivy:retrieve]  found javax.ws.rs#jsr311-api;1.0 in public
[ivy:retrieve]  found javax.xml.ws#jaxws-api;2.1-1 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-rest-rt;1.10 in public
[ivy:retrieve]  found org.springframework#spring-beans;2.5.4 in public
[ivy:retrieve]  found commons-logging#commons-logging;1.0.4 in public
[ivy:retrieve]  found org.springframework#spring-core;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-context;2.5.4 in public
[ivy:retrieve]  found aopalliance#aopalliance;1.0 in public
[ivy:retrieve]  found org.springframework#spring-web;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-webmvc;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-context-support;2.5.4 in public

[ivy:retrieve]  found org.codehaus.jettison#jettison;1.0.1 in public
[ivy:retrieve]  found commons-beanutils#commons-beanutils;1.7.0 in public
[ivy:retrieve]  found com.thoughtworks.xstream#xstream;1.3 in public
[ivy:retrieve]  found xpp3#xpp3_min;1.1.4c in public
[ivy:retrieve]  found com.sun.xml.bind#jaxb-impl;2.1.8 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-jersey-rt;1.10 in public
[ivy:retrieve]  found com.sun.jersey#jersey-server;1.0.2 in java-net-maven2
[ivy:retrieve]  found com.sun.jersey#jersey-core;1.0.2 in java-net-maven2
[ivy:retrieve]  found asm#asm;3.1 in public
[ivy:retrieve]  found com.sun.jersey.contribs#jersey-spring;1.0.2 in java-net-ma
ven2
[ivy:retrieve]  found org.springframework#spring-aop;2.5.4 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-xfire-rt;1.10 in public
[ivy:retrieve]  found jdom#jdom;1.0 in public
[ivy:retrieve]  found javax.mail#mail;1.4 in public
[ivy:retrieve]  found org.codehaus.woodstox#wstx-asl;3.2.7 in public
[ivy:retrieve]  found stax#stax-api;1.0.1 in public
[ivy:retrieve]  found org.codehaus.xfire#xfire-all;1.2.2 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-spring-app-rt;1.10 in pub
lic
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-xfire-client-rt;1.10 in p
ublic
[ivy:retrieve]  found commons-codec#commons-codec;1.3 in public
[ivy:retrieve]  found commons-httpclient#commons-httpclient;3.1 in public
[ivy:retrieve]  found wsdl4j#wsdl4j;1.6.2 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-gwt-rt;1.10 in public
[ivy:retrieve]  found com.google.gwt#gwt-servlet;1.4.60 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-amf-rt;1.10 in public
[ivy:retrieve]  found log4j#log4j;1.2.15 in public
[ivy:retrieve]  found com.adobe.blazeds#blazeds-common;3.0.0.544 in public
[ivy:retrieve]  found com.adobe.blazeds#blazeds-core;3.0.0.544 in public
[ivy:retrieve]  found backport-util-concurrent#backport-util-concurrent;3.1 in p
ublic
[ivy:retrieve]  found com.adobe.blazeds#blazeds-remoting;3.0.0.544 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-cxf-rt;1.10 in public
[ivy:retrieve]  found javax.annotation#jsr250-api;1.0 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-core;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-api;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-common-utilities;2.1.3 in public
[ivy:retrieve]  found javax.xml.bind#jaxb-api;2.1 in public
[ivy:retrieve]  found xml-resolver#xml-resolver;1.2 in public
[ivy:retrieve]  found org.apache.ws.commons.schema#XmlSchema;1.4.2 in public
[ivy:retrieve]  found commons-lang#commons-lang;2.4 in public
[ivy:retrieve]  found org.apache.neethi#neethi;2.0.4 in public
[ivy:retrieve]  found org.apache.cxf#cxf-common-schemas;2.1.3 in public
[ivy:retrieve]  found com.sun.xml.fastinfoset#FastInfoset;1.2.2 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-frontend-jaxws;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-bindings-soap;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-tools-common;2.1.3 in public
[ivy:retrieve]  found org.apache.velocity#velocity;1.5 in public
[ivy:retrieve]  found commons-collections#commons-collections;3.1 in public
[ivy:retrieve]  found oro#oro;2.0.8 in public
[ivy:retrieve]  found com.sun.xml.bind#jaxb-xjc;2.1.7 in public
[ivy:retrieve]  found javax.xml.soap#saaj-api;1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-databinding-jaxb;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-bindings-xml;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-frontend-simple;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-ws-addr;2.1.3 in public
[ivy:retrieve]  found com.sun.xml.messaging.saaj#saaj-impl;1.3.2 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-transports-http;2.1.3 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-jaxws-ri-rt;1.10 in publi
c
[ivy:retrieve]  found cglib#cglib-nodep;2.1_3 in public
[ivy:retrieve]  found org.jvnet.jax-ws-commons.spring#jaxws-spring;1.8 in java-n
et-maven2
[ivy:retrieve]  found com.sun.xml.ws#jaxws-rt;2.1.3 in public
[ivy:retrieve]  found com.sun.org.apache.xml.internal#resolver;20050927 in publi
c
[ivy:retrieve]  found org.jvnet#mimepull;1.1 in public
[ivy:retrieve]  found org.apache.xbean#xbean-spring;2.7 in public
[ivy:retrieve]  found org.jvnet.staxex#stax-ex;1.2 in public
[ivy:retrieve]  found javax.activation#activation;1.1 in public
[ivy:retrieve]  found junit#junit;3.8 in public
[ivy:retrieve]  found com.sun.xml.stream.buffer#streambuffer;0.8 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-core;1.10 in public
[ivy:retrieve]  found javax.servlet#servlet-api;2.3 in public
[ivy:retrieve]  found net.sf.apt-jelly#apt-jelly-freemarker;2.6 in public
[ivy:retrieve]  found net.sf.apt-jelly#apt-jelly-core;2.6 in public
[ivy:retrieve]  found org.freemarker#freemarker;2.3.14 in public
[ivy:retrieve]  found commons-digester#commons-digester;1.7 in public
[ivy:retrieve]  found ant#ant;1.6.2 in public
[ivy:retrieve]  found junit#junit;4.5 in public
[ivy:retrieve]  found org.liquibase#liquibase-core;1.9.2 in public
[ivy:retrieve] :: resolution report :: resolve 9204ms :: artifacts dl 93ms
[ivy:retrieve]  :: evicted modules:
[ivy:retrieve]  asm#asm;2.2.3 by [asm#asm;3.1] in [runtime, compile, test]
[ivy:retrieve]  com.sun.xml.messaging.saaj#saaj-impl;1.3 by [com.sun.xml.messagi
ng.saaj#saaj-impl;1.3.2] in [runtime, compile, test]
[ivy:retrieve]  junit#junit;3.8 by [junit#junit;4.5] in [test]
       ---------------------------------------------------------------------
       |                  |            modules            ||   artifacts   |
       |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
       ---------------------------------------------------------------------
       |      default     |   0   |   0   |   0   |   0   ||   0   |   0   |
       |      runtime     |   84  |   0   |   0   |   2   ||   83  |   0   |
       |      compile     |   91  |   0   |   0   |   2   ||   91  |   0   |
       |       test       |   86  |   0   |   0   |   3   ||   85  |   0   |
       |      sources     |   0   |   0   |   0   |   0   ||   0   |   0   |
       |     javadocs     |   0   |   0   |   0   |   0   ||   0   |   0   |
       ---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: nl.knowledgeplaza#kpprofiler-service
[ivy:retrieve]  confs: [default, runtime, compile, test, sources, javadocs]
[ivy:retrieve]  0 artifacts copied, 259 already retrieved (0kB/172ms)
/






Using:

   <ivy:retrieve conf="runtime" pattern="lib/[artifact]-[revision].[ext]"/>


/ivy-retrieve:
    [echo] Ivy is fetching all dependencies and copying them into the lib dir..
.
No ivy:settings found for the default reference 'ivy.instance'.  A default insta
nce will be used
[ivy:retrieve] :: Ivy 2.1.0-rc1 - 20090319213629 :: http://ant.apache.org/ivy/ :
:
:: loading settings :: file = C:\Documents and Settings\toeu\My Documents\kp\pro
filer\kpprofiler2\components\service\ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: nl.knowledgeplaza#kpprofiler-service
;0.1
[ivy:retrieve]  confs: [runtime]
[ivy:retrieve]  *found org.codehaus.enunciate#enunciate-rt;1.10 in public*
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-core-rt;1.10 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-core-annotations;1.10 in
public
[ivy:retrieve]  found xfire#xfire-jsr181-api;1.0-M1 in public
[ivy:retrieve]  found javax.ws.rs#jsr311-api;1.0 in public
[ivy:retrieve]  found javax.xml.ws#jaxws-api;2.1-1 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-rest-rt;1.10 in public
[ivy:retrieve]  found org.springframework#spring-beans;2.5.4 in public
[ivy:retrieve]  found commons-logging#commons-logging;1.0.4 in public
[ivy:retrieve]  found org.springframework#spring-core;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-context;2.5.4 in public
[ivy:retrieve]  found aopalliance#aopalliance;1.0 in public
[ivy:retrieve]  found org.springframework#spring-web;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-webmvc;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-context-support;2.5.4 in public

[ivy:retrieve]  found org.codehaus.jettison#jettison;1.0.1 in public
[ivy:retrieve]  found commons-beanutils#commons-beanutils;1.7.0 in public
[ivy:retrieve]  found com.thoughtworks.xstream#xstream;1.3 in public
[ivy:retrieve]  found xpp3#xpp3_min;1.1.4c in public
[ivy:retrieve]  found com.sun.xml.bind#jaxb-impl;2.1.8 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-jersey-rt;1.10 in public
[ivy:retrieve]  found com.sun.jersey#jersey-server;1.0.2 in java-net-maven2
[ivy:retrieve]  found com.sun.jersey#jersey-core;1.0.2 in java-net-maven2
[ivy:retrieve]  found asm#asm;3.1 in public
[ivy:retrieve]  found com.sun.jersey.contribs#jersey-spring;1.0.2 in java-net-ma
ven2
[ivy:retrieve]  found org.springframework#spring-aop;2.5.4 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-xfire-rt;1.10 in public
[ivy:retrieve]  found jdom#jdom;1.0 in public
[ivy:retrieve]  found javax.mail#mail;1.4 in public
[ivy:retrieve]  found org.codehaus.woodstox#wstx-asl;3.2.7 in public
[ivy:retrieve]  found stax#stax-api;1.0.1 in public
[ivy:retrieve]  found org.codehaus.xfire#xfire-all;1.2.2 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-spring-app-rt;1.10 in pub
lic
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-xfire-client-rt;1.10 in p
ublic
[ivy:retrieve]  found commons-codec#commons-codec;1.3 in public
[ivy:retrieve]  found commons-httpclient#commons-httpclient;3.1 in public
[ivy:retrieve]  found wsdl4j#wsdl4j;1.6.2 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-gwt-rt;1.10 in public
[ivy:retrieve]  found com.google.gwt#gwt-servlet;1.4.60 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-amf-rt;1.10 in public
[ivy:retrieve]  found log4j#log4j;1.2.15 in public
[ivy:retrieve]  found com.adobe.blazeds#blazeds-common;3.0.0.544 in public
[ivy:retrieve]  found com.adobe.blazeds#blazeds-core;3.0.0.544 in public
[ivy:retrieve]  found backport-util-concurrent#backport-util-concurrent;3.1 in p
ublic
[ivy:retrieve]  found com.adobe.blazeds#blazeds-remoting;3.0.0.544 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-cxf-rt;1.10 in public
[ivy:retrieve]  found javax.annotation#jsr250-api;1.0 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-core;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-api;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-common-utilities;2.1.3 in public
[ivy:retrieve]  found javax.xml.bind#jaxb-api;2.1 in public
[ivy:retrieve]  found xml-resolver#xml-resolver;1.2 in public
[ivy:retrieve]  found org.apache.ws.commons.schema#XmlSchema;1.4.2 in public
[ivy:retrieve]  found commons-lang#commons-lang;2.4 in public
[ivy:retrieve]  found org.apache.neethi#neethi;2.0.4 in public
[ivy:retrieve]  found org.apache.cxf#cxf-common-schemas;2.1.3 in public
[ivy:retrieve]  found com.sun.xml.fastinfoset#FastInfoset;1.2.2 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-frontend-jaxws;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-bindings-soap;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-tools-common;2.1.3 in public
[ivy:retrieve]  found org.apache.velocity#velocity;1.5 in public
[ivy:retrieve]  found commons-collections#commons-collections;3.1 in public
[ivy:retrieve]  found oro#oro;2.0.8 in public
[ivy:retrieve]  found com.sun.xml.bind#jaxb-xjc;2.1.7 in public
[ivy:retrieve]  found javax.xml.soap#saaj-api;1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-databinding-jaxb;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-bindings-xml;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-frontend-simple;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-ws-addr;2.1.3 in public
[ivy:retrieve]  found com.sun.xml.messaging.saaj#saaj-impl;1.3.2 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-transports-http;2.1.3 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-jaxws-ri-rt;1.10 in publi
c
[ivy:retrieve]  found cglib#cglib-nodep;2.1_3 in public
[ivy:retrieve]  found org.jvnet.jax-ws-commons.spring#jaxws-spring;1.8 in java-n
et-maven2
[ivy:retrieve]  found com.sun.xml.ws#jaxws-rt;2.1.3 in public
[ivy:retrieve]  found com.sun.org.apache.xml.internal#resolver;20050927 in publi
c
[ivy:retrieve]  found org.jvnet#mimepull;1.1 in public
[ivy:retrieve]  found org.apache.xbean#xbean-spring;2.7 in public
[ivy:retrieve]  found org.jvnet.staxex#stax-ex;1.2 in public
[ivy:retrieve]  found javax.activation#activation;1.1 in public
[ivy:retrieve]  found junit#junit;3.8 in public
[ivy:retrieve]  found com.sun.xml.stream.buffer#streambuffer;0.8 in public
[ivy:retrieve] :: resolution report :: resolve 4547ms :: artifacts dl 78ms
[ivy:retrieve]  :: evicted modules:
[ivy:retrieve]  asm#asm;2.2.3 by [asm#asm;3.1] in [runtime]
[ivy:retrieve]  com.sun.xml.messaging.saaj#saaj-impl;1.3 by [com.sun.xml.messagi
ng.saaj#saaj-impl;1.3.2] in [runtime]
       ---------------------------------------------------------------------
       |                  |            modules            ||   artifacts   |
       |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
       ---------------------------------------------------------------------
       |      runtime     |   84  |   0   |   0   |   2   ||   83  |   0   |
       ---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: nl.knowledgeplaza#kpprofiler-service
[ivy:retrieve]  confs: [runtime]

BUILD FAILED
C:\Documents and Settings\toeu\My Documents\kp\profiler\kpprofiler2\components\s
ervice\build.xml:44: impossible to ivy retrieve: java.lang.RuntimeException: pro
blem during retrieve of nl.knowledgeplaza#kpprofiler-service: java.lang.RuntimeE
xception: *Multiple artifacts of the module org.codehaus.enunciate#enunciate-rt;1
.10 are retrieved to the same file!* Update the retrieve pattern  to fix this err
or.
/



      

Re: Configurations and Ivy file confusion

Posted by Kirby Files <kf...@masergy.com>.
Tom wrote on 04/24/2009 03:54 AM:
>
>>> OK, many projects have source and jar artifacts with the same name,
>>> so you really want to either set a retrieve pattern which includes
>>> the type of the artifact for disambiguation. If you cannot do this,
>>> you'll need to specify an exclusion rule for your dependencies to
>>> only include type jar. Here are examples of both:
>
> I cannot quite wrap my head around this (I've used your configurations).
> Now, using:

I'm not quite sure what you're asking. Are you wondering why the 
pattern I supplied is truly necessary, and why your fails?

> Using:
>
> <ivy:retrieve conf="runtime" pattern="lib/[artifact]-[revision].[ext]"/>
[...]
> [ivy:retrieve] *found org.codehaus.enunciate#enunciate-rt;1.10 in public*
[...]
> BUILD FAILED
> C:\Documents and Settings\toeu\My
> Documents\kp\profiler\kpprofiler2\components\s
> ervice\build.xml:44: impossible to ivy retrieve:
> java.lang.RuntimeException: pro
> blem during retrieve of nl.knowledgeplaza#kpprofiler-service:
> java.lang.RuntimeException: *Multiple artifacts of the module
> org.codehaus.enunciate#enunciate-rt;1
> .10 are retrieved to the same file!* Update the retrieve pattern to fix
> this error.

org.codehaus.enunciate#enunciate-rt;1.10 specifies a *module*, which 
will have multiple artifacts. If you retrieve those based solely upon 
name-revision.ext, then jars containing different contents, and with 
different type will collide into the same local jarname when you retrieve.

Try "find ~/.ivy2 -name 'enunciate*.jar'" and see what you get 
(substitute the name of your cacheDir if you've changed the default). 
You'll see that the enunciate module has two jars with an artifact 
name of enunciate-rt (they differ by classifier). That's why a 
more-specific retrieve pattern is required.

Thanks,
   --kirby


Re: Configurations and Ivy file confusion

Posted by Tom <tb...@tbee.org>.
>> OK, many projects have source and jar artifacts with the same name, 
>> so you really want to either set a retrieve pattern which includes 
>> the type of the artifact for disambiguation. If you cannot do this, 
>> you'll need to specify an exclusion rule for your dependencies to 
>> only include type jar. Here are examples of both:

I cannot quite wrap my head around this (I've used your configurations). 
Now, using:

    <ivy:retrieve/>


/ivy-retrieve:
     [echo] Ivy is fetching all dependencies and copying them into the 
lib dir..
.
No ivy:settings found for the default reference 'ivy.instance'.  A 
default insta
nce will be used
[ivy:retrieve] :: Ivy 2.1.0-rc1 - 20090319213629 :: 
http://ant.apache.org/ivy/ :
:
:: loading settings :: file = C:\Documents and Settings\toeu\My 
Documents\kp\pro
filer\kpprofiler2\components\service\ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: 
nl.knowledgeplaza#kpprofiler-service
;0.1
[ivy:retrieve]  confs: [default, runtime, compile, test, sources, javadocs]
[ivy:retrieve]  *found org.codehaus.enunciate#enunciate-rt;1.10 in public*
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-core-rt;1.10 in 
public
[ivy:retrieve]  found 
org.codehaus.enunciate#enunciate-core-annotations;1.10 in
public
[ivy:retrieve]  found xfire#xfire-jsr181-api;1.0-M1 in public
[ivy:retrieve]  found javax.ws.rs#jsr311-api;1.0 in public
[ivy:retrieve]  found javax.xml.ws#jaxws-api;2.1-1 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-rest-rt;1.10 in 
public
[ivy:retrieve]  found org.springframework#spring-beans;2.5.4 in public
[ivy:retrieve]  found commons-logging#commons-logging;1.0.4 in public
[ivy:retrieve]  found org.springframework#spring-core;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-context;2.5.4 in public
[ivy:retrieve]  found aopalliance#aopalliance;1.0 in public
[ivy:retrieve]  found org.springframework#spring-web;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-webmvc;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-context-support;2.5.4 
in public

[ivy:retrieve]  found org.codehaus.jettison#jettison;1.0.1 in public
[ivy:retrieve]  found commons-beanutils#commons-beanutils;1.7.0 in public
[ivy:retrieve]  found com.thoughtworks.xstream#xstream;1.3 in public
[ivy:retrieve]  found xpp3#xpp3_min;1.1.4c in public
[ivy:retrieve]  found com.sun.xml.bind#jaxb-impl;2.1.8 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-jersey-rt;1.10 in 
public
[ivy:retrieve]  found com.sun.jersey#jersey-server;1.0.2 in java-net-maven2
[ivy:retrieve]  found com.sun.jersey#jersey-core;1.0.2 in java-net-maven2
[ivy:retrieve]  found asm#asm;3.1 in public
[ivy:retrieve]  found com.sun.jersey.contribs#jersey-spring;1.0.2 in 
java-net-ma
ven2
[ivy:retrieve]  found org.springframework#spring-aop;2.5.4 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-xfire-rt;1.10 in 
public
[ivy:retrieve]  found jdom#jdom;1.0 in public
[ivy:retrieve]  found javax.mail#mail;1.4 in public
[ivy:retrieve]  found org.codehaus.woodstox#wstx-asl;3.2.7 in public
[ivy:retrieve]  found stax#stax-api;1.0.1 in public
[ivy:retrieve]  found org.codehaus.xfire#xfire-all;1.2.2 in public
[ivy:retrieve]  found 
org.codehaus.enunciate#enunciate-spring-app-rt;1.10 in pub
lic
[ivy:retrieve]  found 
org.codehaus.enunciate#enunciate-xfire-client-rt;1.10 in p
ublic
[ivy:retrieve]  found commons-codec#commons-codec;1.3 in public
[ivy:retrieve]  found commons-httpclient#commons-httpclient;3.1 in public
[ivy:retrieve]  found wsdl4j#wsdl4j;1.6.2 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-gwt-rt;1.10 in public
[ivy:retrieve]  found com.google.gwt#gwt-servlet;1.4.60 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-amf-rt;1.10 in public
[ivy:retrieve]  found log4j#log4j;1.2.15 in public
[ivy:retrieve]  found com.adobe.blazeds#blazeds-common;3.0.0.544 in public
[ivy:retrieve]  found com.adobe.blazeds#blazeds-core;3.0.0.544 in public
[ivy:retrieve]  found 
backport-util-concurrent#backport-util-concurrent;3.1 in p
ublic
[ivy:retrieve]  found com.adobe.blazeds#blazeds-remoting;3.0.0.544 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-cxf-rt;1.10 in public
[ivy:retrieve]  found javax.annotation#jsr250-api;1.0 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-core;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-api;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-common-utilities;2.1.3 in public
[ivy:retrieve]  found javax.xml.bind#jaxb-api;2.1 in public
[ivy:retrieve]  found xml-resolver#xml-resolver;1.2 in public
[ivy:retrieve]  found org.apache.ws.commons.schema#XmlSchema;1.4.2 in public
[ivy:retrieve]  found commons-lang#commons-lang;2.4 in public
[ivy:retrieve]  found org.apache.neethi#neethi;2.0.4 in public
[ivy:retrieve]  found org.apache.cxf#cxf-common-schemas;2.1.3 in public
[ivy:retrieve]  found com.sun.xml.fastinfoset#FastInfoset;1.2.2 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-frontend-jaxws;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-bindings-soap;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-tools-common;2.1.3 in public
[ivy:retrieve]  found org.apache.velocity#velocity;1.5 in public
[ivy:retrieve]  found commons-collections#commons-collections;3.1 in public
[ivy:retrieve]  found oro#oro;2.0.8 in public
[ivy:retrieve]  found com.sun.xml.bind#jaxb-xjc;2.1.7 in public
[ivy:retrieve]  found javax.xml.soap#saaj-api;1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-databinding-jaxb;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-bindings-xml;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-frontend-simple;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-ws-addr;2.1.3 in public
[ivy:retrieve]  found com.sun.xml.messaging.saaj#saaj-impl;1.3.2 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-transports-http;2.1.3 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-jaxws-ri-rt;1.10 
in publi
c
[ivy:retrieve]  found cglib#cglib-nodep;2.1_3 in public
[ivy:retrieve]  found org.jvnet.jax-ws-commons.spring#jaxws-spring;1.8 
in java-n
et-maven2
[ivy:retrieve]  found com.sun.xml.ws#jaxws-rt;2.1.3 in public
[ivy:retrieve]  found com.sun.org.apache.xml.internal#resolver;20050927 
in publi
c
[ivy:retrieve]  found org.jvnet#mimepull;1.1 in public
[ivy:retrieve]  found org.apache.xbean#xbean-spring;2.7 in public
[ivy:retrieve]  found org.jvnet.staxex#stax-ex;1.2 in public
[ivy:retrieve]  found javax.activation#activation;1.1 in public
[ivy:retrieve]  found junit#junit;3.8 in public
[ivy:retrieve]  found com.sun.xml.stream.buffer#streambuffer;0.8 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-core;1.10 in public
[ivy:retrieve]  found javax.servlet#servlet-api;2.3 in public
[ivy:retrieve]  found net.sf.apt-jelly#apt-jelly-freemarker;2.6 in public
[ivy:retrieve]  found net.sf.apt-jelly#apt-jelly-core;2.6 in public
[ivy:retrieve]  found org.freemarker#freemarker;2.3.14 in public
[ivy:retrieve]  found commons-digester#commons-digester;1.7 in public
[ivy:retrieve]  found ant#ant;1.6.2 in public
[ivy:retrieve]  found junit#junit;4.5 in public
[ivy:retrieve]  found org.liquibase#liquibase-core;1.9.2 in public
[ivy:retrieve] :: resolution report :: resolve 9204ms :: artifacts dl 93ms
[ivy:retrieve]  :: evicted modules:
[ivy:retrieve]  asm#asm;2.2.3 by [asm#asm;3.1] in [runtime, compile, test]
[ivy:retrieve]  com.sun.xml.messaging.saaj#saaj-impl;1.3 by 
[com.sun.xml.messagi
ng.saaj#saaj-impl;1.3.2] in [runtime, compile, test]
[ivy:retrieve]  junit#junit;3.8 by [junit#junit;4.5] in [test]
        
---------------------------------------------------------------------
        |                  |            modules            ||   
artifacts   |
        |       conf       | number| search|dwnlded|evicted|| 
number|dwnlded|
        
---------------------------------------------------------------------
        |      default     |   0   |   0   |   0   |   0   ||   0   |   
0   |
        |      runtime     |   84  |   0   |   0   |   2   ||   83  |   
0   |
        |      compile     |   91  |   0   |   0   |   2   ||   91  |   
0   |
        |       test       |   86  |   0   |   0   |   3   ||   85  |   
0   |
        |      sources     |   0   |   0   |   0   |   0   ||   0   |   
0   |
        |     javadocs     |   0   |   0   |   0   |   0   ||   0   |   
0   |
        
---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: nl.knowledgeplaza#kpprofiler-service
[ivy:retrieve]  confs: [default, runtime, compile, test, sources, javadocs]
[ivy:retrieve]  0 artifacts copied, 259 already retrieved (0kB/172ms)
/






Using:

    <ivy:retrieve conf="runtime" pattern="lib/[artifact]-[revision].[ext]"/>


/ivy-retrieve:
     [echo] Ivy is fetching all dependencies and copying them into the 
lib dir..
.
No ivy:settings found for the default reference 'ivy.instance'.  A 
default insta
nce will be used
[ivy:retrieve] :: Ivy 2.1.0-rc1 - 20090319213629 :: 
http://ant.apache.org/ivy/ :
:
:: loading settings :: file = C:\Documents and Settings\toeu\My 
Documents\kp\pro
filer\kpprofiler2\components\service\ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: 
nl.knowledgeplaza#kpprofiler-service
;0.1
[ivy:retrieve]  confs: [runtime]
[ivy:retrieve]  *found org.codehaus.enunciate#enunciate-rt;1.10 in public*
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-core-rt;1.10 in 
public
[ivy:retrieve]  found 
org.codehaus.enunciate#enunciate-core-annotations;1.10 in
public
[ivy:retrieve]  found xfire#xfire-jsr181-api;1.0-M1 in public
[ivy:retrieve]  found javax.ws.rs#jsr311-api;1.0 in public
[ivy:retrieve]  found javax.xml.ws#jaxws-api;2.1-1 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-rest-rt;1.10 in 
public
[ivy:retrieve]  found org.springframework#spring-beans;2.5.4 in public
[ivy:retrieve]  found commons-logging#commons-logging;1.0.4 in public
[ivy:retrieve]  found org.springframework#spring-core;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-context;2.5.4 in public
[ivy:retrieve]  found aopalliance#aopalliance;1.0 in public
[ivy:retrieve]  found org.springframework#spring-web;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-webmvc;2.5.4 in public
[ivy:retrieve]  found org.springframework#spring-context-support;2.5.4 
in public

[ivy:retrieve]  found org.codehaus.jettison#jettison;1.0.1 in public
[ivy:retrieve]  found commons-beanutils#commons-beanutils;1.7.0 in public
[ivy:retrieve]  found com.thoughtworks.xstream#xstream;1.3 in public
[ivy:retrieve]  found xpp3#xpp3_min;1.1.4c in public
[ivy:retrieve]  found com.sun.xml.bind#jaxb-impl;2.1.8 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-jersey-rt;1.10 in 
public
[ivy:retrieve]  found com.sun.jersey#jersey-server;1.0.2 in java-net-maven2
[ivy:retrieve]  found com.sun.jersey#jersey-core;1.0.2 in java-net-maven2
[ivy:retrieve]  found asm#asm;3.1 in public
[ivy:retrieve]  found com.sun.jersey.contribs#jersey-spring;1.0.2 in 
java-net-ma
ven2
[ivy:retrieve]  found org.springframework#spring-aop;2.5.4 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-xfire-rt;1.10 in 
public
[ivy:retrieve]  found jdom#jdom;1.0 in public
[ivy:retrieve]  found javax.mail#mail;1.4 in public
[ivy:retrieve]  found org.codehaus.woodstox#wstx-asl;3.2.7 in public
[ivy:retrieve]  found stax#stax-api;1.0.1 in public
[ivy:retrieve]  found org.codehaus.xfire#xfire-all;1.2.2 in public
[ivy:retrieve]  found 
org.codehaus.enunciate#enunciate-spring-app-rt;1.10 in pub
lic
[ivy:retrieve]  found 
org.codehaus.enunciate#enunciate-xfire-client-rt;1.10 in p
ublic
[ivy:retrieve]  found commons-codec#commons-codec;1.3 in public
[ivy:retrieve]  found commons-httpclient#commons-httpclient;3.1 in public
[ivy:retrieve]  found wsdl4j#wsdl4j;1.6.2 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-gwt-rt;1.10 in public
[ivy:retrieve]  found com.google.gwt#gwt-servlet;1.4.60 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-amf-rt;1.10 in public
[ivy:retrieve]  found log4j#log4j;1.2.15 in public
[ivy:retrieve]  found com.adobe.blazeds#blazeds-common;3.0.0.544 in public
[ivy:retrieve]  found com.adobe.blazeds#blazeds-core;3.0.0.544 in public
[ivy:retrieve]  found 
backport-util-concurrent#backport-util-concurrent;3.1 in p
ublic
[ivy:retrieve]  found com.adobe.blazeds#blazeds-remoting;3.0.0.544 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-cxf-rt;1.10 in public
[ivy:retrieve]  found javax.annotation#jsr250-api;1.0 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-core;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-api;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-common-utilities;2.1.3 in public
[ivy:retrieve]  found javax.xml.bind#jaxb-api;2.1 in public
[ivy:retrieve]  found xml-resolver#xml-resolver;1.2 in public
[ivy:retrieve]  found org.apache.ws.commons.schema#XmlSchema;1.4.2 in public
[ivy:retrieve]  found commons-lang#commons-lang;2.4 in public
[ivy:retrieve]  found org.apache.neethi#neethi;2.0.4 in public
[ivy:retrieve]  found org.apache.cxf#cxf-common-schemas;2.1.3 in public
[ivy:retrieve]  found com.sun.xml.fastinfoset#FastInfoset;1.2.2 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-frontend-jaxws;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-bindings-soap;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-tools-common;2.1.3 in public
[ivy:retrieve]  found org.apache.velocity#velocity;1.5 in public
[ivy:retrieve]  found commons-collections#commons-collections;3.1 in public
[ivy:retrieve]  found oro#oro;2.0.8 in public
[ivy:retrieve]  found com.sun.xml.bind#jaxb-xjc;2.1.7 in public
[ivy:retrieve]  found javax.xml.soap#saaj-api;1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-databinding-jaxb;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-bindings-xml;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-frontend-simple;2.1.3 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-ws-addr;2.1.3 in public
[ivy:retrieve]  found com.sun.xml.messaging.saaj#saaj-impl;1.3.2 in public
[ivy:retrieve]  found org.apache.cxf#cxf-rt-transports-http;2.1.3 in public
[ivy:retrieve]  found org.codehaus.enunciate#enunciate-jaxws-ri-rt;1.10 
in publi
c
[ivy:retrieve]  found cglib#cglib-nodep;2.1_3 in public
[ivy:retrieve]  found org.jvnet.jax-ws-commons.spring#jaxws-spring;1.8 
in java-n
et-maven2
[ivy:retrieve]  found com.sun.xml.ws#jaxws-rt;2.1.3 in public
[ivy:retrieve]  found com.sun.org.apache.xml.internal#resolver;20050927 
in publi
c
[ivy:retrieve]  found org.jvnet#mimepull;1.1 in public
[ivy:retrieve]  found org.apache.xbean#xbean-spring;2.7 in public
[ivy:retrieve]  found org.jvnet.staxex#stax-ex;1.2 in public
[ivy:retrieve]  found javax.activation#activation;1.1 in public
[ivy:retrieve]  found junit#junit;3.8 in public
[ivy:retrieve]  found com.sun.xml.stream.buffer#streambuffer;0.8 in public
[ivy:retrieve] :: resolution report :: resolve 4547ms :: artifacts dl 78ms
[ivy:retrieve]  :: evicted modules:
[ivy:retrieve]  asm#asm;2.2.3 by [asm#asm;3.1] in [runtime]
[ivy:retrieve]  com.sun.xml.messaging.saaj#saaj-impl;1.3 by 
[com.sun.xml.messagi
ng.saaj#saaj-impl;1.3.2] in [runtime]
        
---------------------------------------------------------------------
        |                  |            modules            ||   
artifacts   |
        |       conf       | number| search|dwnlded|evicted|| 
number|dwnlded|
        
---------------------------------------------------------------------
        |      runtime     |   84  |   0   |   0   |   2   ||   83  |   
0   |
        
---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: nl.knowledgeplaza#kpprofiler-service
[ivy:retrieve]  confs: [runtime]

BUILD FAILED
C:\Documents and Settings\toeu\My 
Documents\kp\profiler\kpprofiler2\components\s
ervice\build.xml:44: impossible to ivy retrieve: 
java.lang.RuntimeException: pro
blem during retrieve of nl.knowledgeplaza#kpprofiler-service: 
java.lang.RuntimeE
xception: *Multiple artifacts of the module 
org.codehaus.enunciate#enunciate-rt;1
.10 are retrieved to the same file!* Update the retrieve pattern  to fix 
this err
or.
/

Re: Configurations and Ivy file confusion

Posted by Tom <tb...@tbee.org>.
>> Appearantly I did something wrong. Running "ivy:retrieve" now downloads
>> 94 jars. Ok. However, if I I now want to split up like this:
>>
>> <ivy:retrieve conf="runtime" pattern="lib/[artifact]-[revision].[ext]"/>
>> <ivy:retrieve conf="test" 
>> pattern="lib-test/[artifact]-[revision].[ext]"/>
>> <ivy:retrieve conf="build" 
>> pattern="lib-ext/[artifact]-[revision].[ext]"/>
>>
>> Then I get an error
>>
>> /BUILD FAILED
>> C:\Documents and Settings\User\My
>> Documents\kpprofiler2\components\service\build.xml:39: impossible to ivy
>> retrieve: java.lang.RuntimeException: problem during
>> retrieve of nl.knowledgeplaza#kpprofiler-service:
>> java.lang.RuntimeException: Multiple artifacts of the module
>> org.codehaus.enunciate#enunciate-rt;1.10 are ret
>> ieved to the same file! Update the retrieve pattern to fix this error.
>> /
>
> OK, many projects have source and jar artifacts with the same name, so 
> you really want to either set a retrieve pattern which includes the 
> type of the artifact for disambiguation. If you cannot do this, you'll 
> need to specify an exclusion rule for your dependencies to only 
> include type jar. Here are examples of both:
>
>         <ivy:retrieve 
> pattern="${ivy.lib.dir}/[type]/[artifact]-[revision].[ext]" 
> haltonfailure="true" conf="build" sync="true"/>
>
>         <dependencies>
>           <exclude type="source"/>
>         </dependencies>
>

Hm. Ok, I understand the problem that if multiple artifact are 
downloaded to the same file, then that would be an error. But why does 
"<ivy:retrieve/>" not have the same problem? Logically again; I have 4 
dependency lines resulting in 94 jars, and the only thing I can do is 
filter these jars using configuration labels, how does limiting these 94 
jars introduce a retrieved-to-same-file exception? If the error doesn't 
occur in the 94, how can it occur in a subset?

Tom

Re: Configurations and Ivy file confusion

Posted by Kirby Files <kf...@masergy.com>.
Tom wrote on 04/23/2009 02:41 AM:
>
>> A module defines one or more configurations, which will be used to
>> meet different needs. For example, the logging framework slf4j defines
>> a "core" configuration, which includes only the API jar. It then has a
>> configs for each implementation choice a user might want, "log4j",
>> "jul", "jcl", etc.
>
> That actually makes sense. :-) So it is a qualifier, though up by the
> developer. Is there some central place where one can find these
> qualifiers? Like the pom.xml in the Maven repositories?

I'm not sure that the Maven poms usually specify a scope. Some may, 
but many may not. For high-quality Ivy modules, I recommend Ivy Roundup:
   http://code.google.com/p/ivyroundup/

> So what would be the appropriate way to split-up the set. As said: I
> want to split between between what is required at compiletime, test and
> runtime. The leading example would be that junit should not be present
> in lib but lib-test.

I typically have some configurations like the following:
         <conf name="default" transitive="true" visibility="public" />
         <conf name="runtime" transitive="true" visibility="public" />
         <conf name="compile" extends="deploy" transitive="true" 
visibility="private" />
         <conf name="test" extends="deploy" transitive="true" 
visibility="private" />
         <conf name="sources" transitive="true" visibility="public" />
         <conf name="javadocs" transitive="true" visibility="public" />

The public configurations are there for me to define publications 
which will be visible to other modules. The private ones are just for 
specifying dependencies during my different phases of 
compile/test/run. For compile and test, I generally need everything 
required by runtime (so I extend that config), plus some extra 
libraries (like junit for testing or servlet-api for compilation).

> Appearantly I did something wrong. Running "ivy:retrieve" now downloads
> 94 jars. Ok. However, if I I now want to split up like this:
>
> <ivy:retrieve conf="runtime" pattern="lib/[artifact]-[revision].[ext]"/>
> <ivy:retrieve conf="test" pattern="lib-test/[artifact]-[revision].[ext]"/>
> <ivy:retrieve conf="build" pattern="lib-ext/[artifact]-[revision].[ext]"/>
>
> Then I get an error
>
> /BUILD FAILED
> C:\Documents and Settings\User\My
> Documents\kpprofiler2\components\service\build.xml:39: impossible to ivy
> retrieve: java.lang.RuntimeException: problem during
> retrieve of nl.knowledgeplaza#kpprofiler-service:
> java.lang.RuntimeException: Multiple artifacts of the module
> org.codehaus.enunciate#enunciate-rt;1.10 are ret
> ieved to the same file! Update the retrieve pattern to fix this error.
> /

OK, many projects have source and jar artifacts with the same name, so 
you really want to either set a retrieve pattern which includes the 
type of the artifact for disambiguation. If you cannot do this, you'll 
need to specify an exclusion rule for your dependencies to only 
include type jar. Here are examples of both:

         <ivy:retrieve 
pattern="${ivy.lib.dir}/[type]/[artifact]-[revision].[ext]" 
haltonfailure="true" conf="build" sync="true"/>

         <dependencies>
           <exclude type="source"/>
         </dependencies>

Thanks,
---
Kirby Files
Software Architect
Masergy Communications
kfiles@masergy.com

Re: Configurations and Ivy file confusion

Posted by Tom <tb...@tbee.org>.
> A module defines one or more configurations, which will be used to 
> meet different needs. For example, the logging framework slf4j defines 
> a "core" configuration, which includes only the API jar. It then has a 
> configs for each implementation choice a user might want, "log4j", 
> "jul", "jcl", etc.

That actually makes sense. :-) So it is a qualifier, though up by the 
developer. Is there some central place where one can find these 
qualifiers? Like the pom.xml in the Maven repositories?


> If you wanted to use slf4j and log4j in your runtime deployment, you'd 
> map your runtime configuration to slf4j's core and log4j configurations:
>
> <dependency name="slf4j" conf="runtime->core,log4j"/>

My runtime requires slf4j's core and log4j. Understood. However, what 
happens when slf4j then cascades onto log4j itself which theoretically 
may have a different set of configurations? Let's assume log4j uses 
"main" instead of "core"? Hmmmm... Slf4j-core does have it own 
dependency information which knows about what configurations it 
dependency supports. Ok. It really makes sense.

So what would be the appropriate way to split-up the set. As said: I 
want to split between between what is required at compiletime, test and 
runtime. The leading example would be that junit should not be present 
in lib but lib-test.

>
> Curious. Have you tried identifying the set of jars which differs 
> between your two ivy.xml files, and looking in your resolution output 
> to see which dependencies they derive from?

Appearantly I did something wrong. Running "ivy:retrieve" now downloads 
94 jars. Ok. However, if I I now want to split up like this:

        <ivy:retrieve conf="runtime" 
pattern="lib/[artifact]-[revision].[ext]"/>
        <ivy:retrieve conf="test" 
pattern="lib-test/[artifact]-[revision].[ext]"/>
        <ivy:retrieve conf="build" 
pattern="lib-ext/[artifact]-[revision].[ext]"/>

Then I get an error

/BUILD FAILED
C:\Documents and Settings\User\My 
Documents\kpprofiler2\components\service\build.xml:39: impossible to ivy 
retrieve: java.lang.RuntimeException: problem during
retrieve of nl.knowledgeplaza#kpprofiler-service: 
java.lang.RuntimeException: Multiple artifacts of the module 
org.codehaus.enunciate#enunciate-rt;1.10 are ret
ieved to the same file! Update the retrieve pattern  to fix this error.
/

For easy reproducing I have attached my ivy.xml and ivysettings.xml

Tom


Re: Configurations and Ivy file confusion

Posted by Kirby Files <kf...@masergy.com>.
Tom wrote on 04/22/2009 01:10 PM:
>
>> In this case, you're relying on Ivy's default configuration mapping,
>> which I believe is "*->*", which means you'll get all of the artifacts
>> (jars) defined by *any* of the dependency's configurations.
>
> Ok. I do not understand what that means, but ok.

A module defines one or more configurations, which will be used to 
meet different needs. For example, the logging framework slf4j defines 
a "core" configuration, which includes only the API jar. It then has a 
configs for each implementation choice a user might want, "log4j", 
"jul", "jcl", etc.

[See the ivy.xml for slf4j in the IvyRoundup repository at:
 
http://ivyroundup.googlecode.com/svn/trunk/repo/modules/org.slf4j/slf4j/1.5.6/ivy.xml
]

If you wanted to use slf4j and log4j in your runtime deployment, you'd 
map your runtime configuration to slf4j's core and log4j configurations:

<dependency name="slf4j" conf="runtime->core,log4j"/>

>> Now you have limited the artifacts to those defined by the "default"
>> configuration of each dependency. That probably doesn't include jars
>> from configs like "test", "sources", etc.
>
> I have tried "runtime->*" but that did not change anything.

Curious. Have you tried identifying the set of jars which differs 
between your two ivy.xml files, and looking in your resolution output 
to see which dependencies they derive from?

>> Configuration mapping has been the most confusing part of Ivy for me.
>> I still haven't mastered the use of it to come up with a best
>> practices within our organization.
>
> May I put on the table that if a feature is this complicated to use,
> that maybe there is a flaw in the underlying concept?

Well, by default, you can avoid using them, and accept the de facto 
behavior. However, dependency mgmt is a complex practice, and many 
users have differing needs. I myself find the configuration mapping 
helpful, though I use it only lightly. Others with more complex 
environments will find them indispensible. I'm sure others wish Ivy 
had *even more* choice and configurability in this area.

> 1. my four dependency lines are resolved by Ivy to a list of 93 jars.
> 2. the only thing I can do with this list is limited / filter, I cannot
> expand it any further
> 3. so appearantly the configuration allows applying a filter to this list

I would agree so far.

> 4. you must filter on some attribute that is assigned to each jar...
> where would that assignment take place?
> 5. the jar itself could have that attribute set, but the developer can't
> know for what the jar is used.

In practice, yes, the developer of a library or framework module 
determines what common uses, or profiles, their project has, and 
assigns the jar artifacts to one of these profiles (called 
configurations in Ivy). I don't know a whole lot about Maven, but 
don't think it is anywhere near as flexible as Ivy in this regard, so 
Ivy attempts to helpfully assign Maven scopes to Ivy configurations.

> 6. the only logical place to assign a value would be in de ivy.xml in
> the project using it, inheriting from the initial line

The goal of configurations is to avoid having to find *all* of the 
jars published by a project, and then explicitly "exlcude" and 
"include" those that you need for say, compilation, deployment, or 
interaction with another framework. Having to use explicit exclusion 
rules for each dependency (which sounds like what you're discussing) 
would be beyond tedious. Configurations allow a module to publish 
different sets of jars for several different use cases, and for a 
consumer of the module to choose which use case aligns with their needs.

Thanks,
---
Kirby Files
Software Architect
Masergy Communications
kfiles@masergy.com

Re: Configurations and Ivy file confusion

Posted by Tom <tb...@tbee.org>.
> In this case, you're relying on Ivy's default configuration mapping, 
> which I believe is "*->*", which means you'll get all of the artifacts 
> (jars) defined by *any* of the dependency's configurations.

Ok. I do not understand what that means, but ok.


> Now you have limited the artifacts to those defined by the "default" 
> configuration of each dependency. That probably doesn't include jars 
> from configs like "test", "sources", etc.

I have tried "runtime->*" but that did not change anything.



> Configuration mapping has been the most confusing part of Ivy for me. 
> I still haven't mastered the use of it to come up with a best 
> practices within our organization. 

May I put on the table that if a feature is this complicated to use, 
that maybe there is a flaw in the underlying concept? I still do not 
understand what configurations are trying to do. Are they:
- trying to bind dependencies to usages? (The dependency is used within 
the scope "test", or "runtime", as I'm trying to do now)
- trying to bind dependencies to deliverables? (For the deliverable 
"xyz.jar", use dependencies...)

I also did not find a concept of "configuration" in Maven. Let's look at 
this from a simplistic approach:
1. my four dependency lines are resolved by Ivy to a list of 93 jars.
2. the only thing I can do with this list is limited / filter, I cannot 
expand it any further
3. so appearantly the configuration allows applying a filter to this list
4. you must filter on some attribute that is assigned to each jar... 
where would that assignment take place?
5. the jar itself could have that attribute set, but the developer can't 
know for what the jar is used.
6. the only logical place to assign a value would be in de ivy.xml in 
the project using it, inheriting from the initial line

Where am I going wrong?





Re: Configurations and Ivy file confusion

Posted by Kirby Files <kf...@masergy.com>.
Tom wrote on 04/22/2009 10:41 AM:
> I also have the problem that it is not working as expected. Using the
> following ivy.xml:
>
> <dependencies>
> <dependency org="org.codehaus.enunciate" name="enunciate-rt"
> rev="1.10"/> <dependency org="org.codehaus.enunciate"
> name="enunciate-core" rev="1.10" /> <!-- also contains the ant task -->
> <dependency org="junit" name="junit" rev="4.5"/> <dependency
> org="org.liquibase" name="liquibase-core" rev="1.9.2"/> </dependencies>
> </ivy-module>

In this case, you're relying on Ivy's default configuration mapping, 
which I believe is "*->*", which means you'll get all of the artifacts 
(jars) defined by *any* of the dependency's configurations.

> /And the running "<ivy:retrieve/>" results in 93 jars being downloaded,
> amongst which are "activation-1.1.jar" and "jaxb-api-2.1.jar". Now, I
> wanted to split these up according to usage:
>
> <dependencies>
> <dependency org="org.codehaus.enunciate" name="enunciate-rt" rev="1.10"
> conf="runtime->default"/> <dependency org="org.codehaus.enunciate"
> name="enunciate-core" rev="1.10" conf="build->default"/>
> <dependency org="junit" name="junit" rev="4.5" conf="test->default"/>
> <dependency org="org.liquibase" name="liquibase-core" rev="1.9.2"
> conf="test->default"/> </dependencies>
> </ivy-module>

Now you have limited the artifacts to those defined by the "default" 
configuration of each dependency. That probably doesn't include jars 
from configs like "test", "sources", etc.

> Instead of 93 now 78 jars are being downloaded and a.o.
> "activation-1.1.jar" and "jaxb-api-2.1.jar" are missing. I do not
> understand! The same happens if I just do a "<ivy:retrieve/>": 78 jars.
> Same dependencies... One of these dependency must be referring to the
> missing jars. How can they be missing?

Configuration mapping has been the most confusing part of Ivy for me. 
I still haven't mastered the use of it to come up with a best 
practices within our organization. If you generally are using projects 
found on the ibiblio Maven2 repo, you should get familiar with the 
default configurations which Maven defines. You can use 
defaultconfmapping to expand or limit the artifacts for all of your 
configurations:

     <dependencies 
defaultconfmapping="build->default,test;deploy->default">

Thanks,
   --kirby


Re: Configurations and Ivy file confusion

Posted by Tom <tb...@tbee.org>.
I also have the problem that it is not working as expected. Using the 
following ivy.xml:

/<?xml version="1.0"?>
<ivy-module version="2.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">    

    <info organisation="nl.knowledgeplaza" module="kpprofiler-service" 
revision="0.1"/>   

    <dependencies>
        <dependency org="org.codehaus.enunciate" name="enunciate-rt" 
rev="1.10"/>       
        <dependency org="org.codehaus.enunciate" name="enunciate-core" 
rev="1.10" /> <!-- also contains the ant task -->       
        <dependency org="junit" name="junit" rev="4.5"/>   
        <dependency org="org.liquibase" name="liquibase-core" 
rev="1.9.2"/>   
     </dependencies>
</ivy-module>


/And the running "<ivy:retrieve/>" results in 93 jars being downloaded, 
amongst which are "activation-1.1.jar" and "jaxb-api-2.1.jar". Now, I 
wanted to split these up according to usage:

/<?xml version="1.0"?>
<ivy-module version="2.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">    

    <info organisation="nl.knowledgeplaza" module="kpprofiler-service" 
revision="0.1"/>   

    <configurations>
        <conf name="runtime" description="runtime"/>
        <conf name="build" description="for building"/>
        <conf name="test" description="for testing our framework"/>
    </configurations>
   
    <dependencies>
        <dependency org="org.codehaus.enunciate" name="enunciate-rt" 
rev="1.10" conf="runtime->default"/>       
        <dependency org="org.codehaus.enunciate" name="enunciate-core" 
rev="1.10" conf="build->default"/>
        <dependency org="junit" name="junit" rev="4.5" 
conf="test->default"/>   
        <dependency org="org.liquibase" name="liquibase-core" 
rev="1.9.2" conf="test->default"/>   
     </dependencies>
</ivy-module>
/

Now I want to run three ivy-retrieves instead of one:

/        <ivy:retrieve conf="runtime" 
pattern="lib/[artifact]-[revision].[ext]"/>
        <ivy:retrieve conf="test" 
pattern="lib-test/[artifact]-[revision].[ext]"/>
        <ivy:retrieve conf="build" 
pattern="lib-ext/[artifact]-[revision].[ext]"/>
/

Instead of 93 now 78 jars are being downloaded and a.o. 
"activation-1.1.jar" and "jaxb-api-2.1.jar" are missing. I do not 
understand! The same happens if I just do a "<ivy:retrieve/>": 78 jars. 
Same dependencies... One of these dependency must be referring to the 
missing jars. How can they be missing?

Tom

Re: Configurations and Ivy file confusion

Posted by Joshua Tharp <jo...@alumni.calpoly.edu>.
My problem (partly persisting by the way, I was apparently a little too
quick to declare victory) seems to be with a difference in the way things
are being resolved by my local resolver and my shared one. I can get it to
resolve against one, but not both.

In my antlib ivy.xml I have:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module
    version="2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd
">

<info
    organisation="com.mycompany.tools"
    module="antlib">
  <description>
    A collection of ant scripts that are pieced together for an actual
build.
  </description>
</info>

</ivy-module>

And in my using ivy.xml I've got
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module
    version="2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd
">
<info
    organisation="com.mycompany.dfm"
    module="dfm">
  <description>The DFM</description>
</info>

<configurations>
  <conf
      name="default"
      visibility="public" />
  <conf
      name="antlib"
      visibility="private"
      transitive="false" />
</configurations>

<dependencies>
  <dependency
      org="com.mycompany.tools"
      name="antlib"
      rev="0.3.+"
      conf="antlib->default" />
</dependencies>

</ivy-module>


This combination resolves against my shared repository, but not against my
local one. With the local repository I get the error:
[ivy:retrieve] :: resolving dependencies ::
com.mycompany.dfm#dfm;working@Hawk
[ivy:retrieve]  confs: [antlib]
[ivy:retrieve]  found com.mycompany.tools#antlib;0.3.21_SNAPSHOT in local
[ivy:retrieve]  [0.3.21_SNAPSHOT] com.mycompany.tools#antlib;0.3.+
[ivy:retrieve] :: resolution report :: resolve 94ms :: artifacts dl 0ms

---------------------------------------------------------------------
        |                  |            modules            ||   artifacts
|
        |       conf       | number| search|dwnlded|evicted||
number|dwnlded|

---------------------------------------------------------------------
        |      antlib      |   1   |   1   |   1   |   0   ||   0   |   0
|

---------------------------------------------------------------------
[ivy:retrieve]
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          :: com.mycompany.tools#antlib;0.3.21_SNAPSHOT:
configuration not found in com.mycompany.tools#antlib;0.3.21_SNAPSHOT:
'default'. It was required from com.mycompany.dfm#dfm;working@Hawk antlib
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

BUILD FAILED
D:\co\dfm\cc-boot-build.xml:21: The following error occurred while executing
this line:
C:\Documents and Settings\jlt\.ant\bootstrap.xml:12: The following error
occurred while executing this line:
jar:file:/C:/Documents%20and%20Settings/jlt/.ant/lib/bootstrap.jar!/com/att/csar/bootstrap/antlib.xml:38:
impossible to resolve dependencies:
        resolve failed - see output for details

Total time: 0 seconds


But when I resolve against the shared resolver:
[ivy:retrieve] :: resolving dependencies ::
com.mycompany.dfm#dfm;working@Hawk
[ivy:retrieve]  confs: [antlib]
[ivy:retrieve]  found com.mycompany.tools#antlib;0.3.20 in shared
[ivy:retrieve]  [0.3.20] com.mycompany.tools#antlib;0.3.+
[ivy:retrieve] downloading
http://internal.server/repository/com.mycompany.tools/antlib/0.3.20/antlib-0.3.20.jar...
[ivy:retrieve] .. (7kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]  [SUCCESSFUL ] com.mycompany.tools#antlib;0.3.20!antlib.jar
(32ms)

[ivy:retrieve] :: resolution report :: resolve 531ms :: artifacts dl 47ms

---------------------------------------------------------------------
        |                  |            modules            ||   artifacts
|
        |       conf       | number| search|dwnlded|evicted||
number|dwnlded|

---------------------------------------------------------------------
        |      antlib      |   1   |   1   |   0   |   0   ||   1   |   1
|

---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: com.mycompany.dfm#dfm
[ivy:retrieve]  confs: [antlib]

BUILD SUCCESSFUL



So if there are some common gotchas that might lead to this behavior, I'd
appreciate a pointer.

Josh



On Wed, Apr 22, 2009 at 7:02 AM, Tom <tb...@tbee.org> wrote:

> Good for you, it also took me the better part of the afternoon to get a
> working ivy.xml. I would suggest providing some more tutorials around the
> configuration concept.
>
> Just to clarify: right now I'm trying to setup different collections of
> jars for building and testing. E.g. I have a set with jars that are required
> for building, which differs from the runtime set and from the test set.
>
> For example:
> - runtime = log4j, commons this, commons that, framework here, ...
> - build = runtime + servlet.api (servlet api is provided by the container,
> so not part of the deliverable/runtime, but required for compiling the
> sources)
> - test = runtime + junit, hsqldb
>
> In the end it is simple, but never the less... Since this maybe is a common
> setup, it might make a good example.
>
>
>
>
>
>
> Joshua Tharp wrote:
>
>> Nevermind. I think I figured out what I was doing wrong.
>>
>> On Tue, Apr 21, 2009 at 4:19 PM, Joshua Tharp <
>> joshua-tharp@alumni.calpoly.edu> wrote:
>>
>>
>>
>>> Serious ivy newbie alert
>>>
>>> I am utterly baffled by the configuration mechanism with Ivy.
>>>
>>
>

Re: Configurations and Ivy file confusion

Posted by Tom <tb...@tbee.org>.
Good for you, it also took me the better part of the afternoon to get a 
working ivy.xml. I would suggest providing some more tutorials around 
the configuration concept.

Just to clarify: right now I'm trying to setup different collections of 
jars for building and testing. E.g. I have a set with jars that are 
required for building, which differs from the runtime set and from the 
test set.

For example:
- runtime = log4j, commons this, commons that, framework here, ...
- build = runtime + servlet.api (servlet api is provided by the 
container, so not part of the deliverable/runtime, but required for 
compiling the sources)
- test = runtime + junit, hsqldb

In the end it is simple, but never the less... Since this maybe is a 
common setup, it might make a good example.





Joshua Tharp wrote:
> Nevermind. I think I figured out what I was doing wrong.
>
> On Tue, Apr 21, 2009 at 4:19 PM, Joshua Tharp <
> joshua-tharp@alumni.calpoly.edu> wrote:
>
>   
>> Serious ivy newbie alert
>>
>> I am utterly baffled by the configuration mechanism with Ivy. 


Re: Configurations and Ivy file confusion

Posted by Joshua Tharp <jo...@alumni.calpoly.edu>.
Nevermind. I think I figured out what I was doing wrong.

On Tue, Apr 21, 2009 at 4:19 PM, Joshua Tharp <
joshua-tharp@alumni.calpoly.edu> wrote:

> Serious ivy newbie alert
>
> I am utterly baffled by the configuration mechanism with Ivy. If I leave
> everything in the default configuration things work pretty much as I would
> expect. However, I'm trying to set up one of my modules to be used only as a
> build tool in another (i.e. I don't want it to be part of the second
> module's delivery).
>
> I have one module called antlib that contains my build tool:
> antlib/ivy.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <ivy-module
>     version="2.0"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:noNamespaceSchemaLocation="
> http://ant.apache.org/ivy/schemas/ivy.xsd">
>
> <info
>     organisation="com.mycompany.tools"
>     module="antlib">
>   <description>
>     A collection of ant scripts that are pieced together for an actual
> build.
>   </description>
> </info>
> </ivy-module>
>
> Now I only want this module to be used as part of the build in another
> module, not transitive. So I thought I could declare a configuration in my
> other Ivy file that used the first.
> dfm/ivy.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <ivy-module
>     version="2.0"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:noNamespaceSchemaLocation="
> http://ant.apache.org/ivy/schemas/ivy.xsd">
> <info
>     organisation="com.mycompany.dfm"
>     module="dfm">
>   <description>The DFM</description>
> </info>
>
> <configurations>
>   <conf
>       name="default"
>       visibility="public" />
>   <conf
>       name="antlib"
>       visibility="private" />
> </configurations>
>
> <dependencies>
>   <dependency
>       org="com.mycompany.tools"
>       name="antlib"
>       rev="0.3.+"
>       conf="antlib" />
> </dependencies>
>
> </ivy-module>
>
> When I build and deploy antlib on my PC then everything seems to work fine.
> However, when I have my CruiseControl system publish antlib then my
> configured resolver errors out on the shared one.
> ivysettings.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <ivysettings>
>   <settings defaultResolver="default" />
>
>   <property
>       name="ivy.local.default.root"
>       value="${ivy.default.ivy.user.dir}/local"
>       override="false" />
>   <property
>       name="ivy.local.default.ivy.pattern"
>       value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
>       override="false" />
>   <property
>       name="ivy.local.default.artifact.pattern"
>       value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
>       override="false" />
>
>   <property
>       name="repo.root"
>       value="http://internal.system/repository" />
>   <property
>       name="module.pat"
>       value="[organisation]/[module]/[revision]" />
>   <property
>       name="ivy.pat"
>       value="ivy-[revision].xml" />
>   <property
>       name="artifact.pat"
>       value="[module]-[revision].[ext]" />
>
>   <resolvers>
>     <filesystem
>         name="local"
>         checkmodified="true"
>         changingMatcher="regexp"
>         changingPattern=".*_SNAPSHOT">
>       <ivy
> pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern}" />
>       <artifact
> pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern}" />
>     </filesystem>
>
>     <url name="shared">
>       <ivy pattern="${repo.root}/${module.pat}/${ivy.pat} "/>
>       <artifact pattern="${repo.root}/${module.pat}/${artifact.pat}" />
>     </url>
>
>     <filesystem
>         name="shared-repository"
>         local="true">
>       <ivy pattern="${ivy.publish.d}/${module.pat}/${ivy.pat} "/>
>       <artifact pattern="${ivy.publish.d}/${module.pat}/${artifact.pat}" />
>     </filesystem>
>   </resolvers>
>
>   <include url="${ivy.default.settings.dir}/ivysettings-public.xml" />
>   <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml" />
>   <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"
> />
> </ivysettings>
>
> I use the shared-repository resolver to publish the artifacts with my
> CruiseControl setup and use the shared one to get them back out on my PC.
>
> I've poured through the configurations, default configurations, and inline
> configurations documentation... I must be missing something pretty basic
> here.
>
> Here is the part of my build script that is calling Ivy
>       <ivy:settings
>           file="${my.ivy.settings.file}"
>           id="ivy.instance" />
>
>       <ivy:info />
>
>       <ivy:retrieve
>           conf="antlib"
>           pattern="${lib.d}/antlib.jar" />
>
> Here is the error I get when I try to resolve against the repository.
> [ivy:retrieve]  public: no ivy file nor artifact found for
> com.mycompany.tools#antlib;0.3.+
> [ivy:retrieve]  found com.mycompany.tools#antlib;0.3.11 in shared
> [ivy:retrieve]  [0.3.11] com.mycompany.tools#antlib;0.3.+
> [ivy:retrieve]  resolved ivy file produced in C:\Documents and
> Settings\jlt\.ivy2\cache\resolved-com.mycompany.dfm-dfm-working@Hawk.xml
> [ivy:retrieve] :: downloading artifacts ::
> [ivy:retrieve] :: resolution report :: resolve 437ms :: artifacts dl 0ms
>
> ---------------------------------------------------------------------
>         |                  |            modules            ||   artifacts
> |
>         |       conf       | number| search|dwnlded|evicted||
> number|dwnlded|
>
> ---------------------------------------------------------------------
>         |      antlib      |   1   |   0   |   0   |   0   ||   0   |   0
> |
>
> ---------------------------------------------------------------------
> [ivy:retrieve] WARN:    ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve] WARN:    ::          UNRESOLVED DEPENDENCIES         ::
> [ivy:retrieve] WARN:    ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve] WARN:    :: com.mycompany.tools#antlib;0.3.11: configuration
> not found in com.mycompany.tools#antlib;0.3.11: 'antlib'. It was required
> from com.mycompany.dfm#dfm;working@Hawk antlib
> [ivy:retrieve] WARN:    ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]  report for com.mycomany.dfm#dfm;working@Hawk antlib
> produced in C:\Documents and
> Settings\jlt\.ivy2\cache\com.mycompany.dfm-dfm-antlib.xml
> [ivy:retrieve]  resolve done (437ms resolve - 0ms download)
> [ivy:retrieve]
> [ivy:retrieve] :: problems summary ::
> [ivy:retrieve] :::: WARNINGS
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          :: com.mycompany.tools#antlib;0.3.11: configuration
> not found in com.mycompany.tools#antlib;0.3.11: 'antlib'. It was required
> from com.mycompany.dfm#dfm;working@Hawk antlib
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]
> [ivy:retrieve]
> [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
>    [subant] Exiting C:\Documents and Settings\jlt\.ant\bootstrap.xml.
>
> BUILD FAILED
> D:\co\dfm\cc-boot-build.xml:21: The following error occurred while
> executing this line:
> C:\Documents and Settings\jlt\.ant\bootstrap.xml:12: The following error
> occurred while executing this line:
> jar:file:/C:/Documents%20and%20Settings/jlt/.ant/lib/bootstrap.jar!/com/mycompany/bootstrap/antlib.xml:38:
> impossible to resolve dependencies:
>         resolve failed - see output for details
>         at
> org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
> ... lots more stack trace...
>
> Thanks for your time,
>
> Josh
>