ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Tharp <joshua-th...@alumni.calpoly.edu>
Subject Re: Configurations and Ivy file confusion
Date Wed, 22 Apr 2009 14:21:33 GMT
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 <tbee@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.
>>>
>>
>

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