ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: unresolved dependencies
Date Thu, 21 Feb 2008 19:28:02 GMT
This is a problem of configuration mapping. When you say <dependency ..
conf="interface" /> this is equivalent to <dependency ..
conf="interface->interface" />, so you tell Ivy that your module depends on
the "interface" configuration of your dependency in your own module
"interface" configuration. But your dependency does not define this conf, so
Ivy complains about that. You should better declare your dependency with
<dependency .. conf="interface->default" />. I suggest taking time to read
the dependency element reference documentation which documents pretty
extensively configuraiton mapping. The configurations tutorial is a nice
read too.

Xavier

On Fri, Feb 15, 2008 at 12:32 AM, Neil Lott <neilmatthewlott@yahoo.com>
wrote:

> Please help :)
>
> I have two configurations -- interface and server
>
> <configurations>
>     <conf name="interface"  description="dependencies for interface"/>
>     <conf name="server" extends="interface" description="dependencies
> during runtime of server"/>
>
> I have two jars in my repository that are pom-based log4j and jacorb:
>
> [maven@azurite 2.2.2]$ ls -lag
> total 4140
> drwxr-xr-x 2 maven    4096 2008-01-29 14:27 .
> drwxr-xr-x 3 maven    4096 2008-01-29 14:27 ..
> -rwxr-xr-x 1 maven 4221878 2008-01-29 14:27 jacorb-2.2.2.jar
> -rw-r--r-- 1 maven     186 2008-01-29 14:27 jacorb-2.2.2.pom
> [maven@azurite 2.2.2]$ cat jacorb-2.2.2.pom
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>jacorb</groupId>
> <artifactId>jacorb</artifactId>
> <version>2.2.2</version>
> </project>
>
> [maven@azurite log4j]$ cd log4j/
> [maven@azurite log4j]$ ls
> 1.2.8
> [maven@azurite log4j]$ cd 1.2.8/
> [maven@azurite 1.2.8]$ ls
> log4j-1.2.8.jar  log4j-1.2.8.pom
> [maven@azurite 1.2.8]$ cat log4j-1.2.8.pom
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.8</version>
> </project>
> [maven@azurite 1.2.8]$
>
> Now in my ivy.xml file I declare my dependencies:
>
> <dependencies>
>     <dependency org="log4j" name="log4j" rev="1.2.8" conf="interface"/>
>     <dependency org="jacorb" name="jacorb" rev="2.2.2" conf="server"/>
>
> However, this fails when I do my ivy retrieve
>
> [ivy:settings] :: Ivy 2.0.0-beta2-local-20080213132935 -
> 20080213132935 :: http://ant.apache.org/ivy/ ::
> [ivy:settings] :: loading settings :: file = /Users/neil/Business/
> SnowyRangeConsulting/projects/twc/depot/server/releases/main/common-
> ivy-settings.xml
> [ivy:settings] using ivy.default.ivy.user.dir variable for default ivy
> user dir: /Users/neil/Business/SnowyRangeConsulting/projects/twc/
> thirdparty/ivy
> [ivy:settings] no default cache defined: set to /Users/neil/Business/
> SnowyRangeConsulting/projects/twc/thirdparty/ivy/cache
> [ivy:settings] settings loaded (52ms)
> [ivy:settings]  default cache: /Users/neil/Business/
> SnowyRangeConsulting/projects/twc/thirdparty/ivy/cache
> [ivy:settings]  default resolver: chained
> [ivy:settings]  -- 3 resolvers:
> [ivy:settings]  chained [chain] [local, shared]
> [ivy:settings]  local [file]
> [ivy:settings]  shared [ssh]
>
> ivy-retrieve:
> [ivy:retrieve] no resolved descriptor found: launching default resolve
> [ivy:retrieve] using ivy parser to parse file:/Users/neil/Business/
> SnowyRangeConsulting/projects/twc/depot/server/releases/main/
> components/btm/ivy.xml
> [ivy:retrieve] :: resolving dependencies :: twc#mas-coredn-btm;working@
> flicker.local
> [ivy:retrieve]  confs: [interface, server]
> [ivy:retrieve]  validate = true
> [ivy:retrieve]  refresh = false
> [ivy:retrieve] resolving dependencies for configuration 'interface'
> [ivy:retrieve] == resolving dependencies for twc#mas-coredn-btm;working@
> flicker.local
>  [interface]
> [ivy:retrieve] == resolving dependencies twc#mas-coredn-btm;working@
> flicker.local-
>  >log4j#log4j;1.2.8 [interface->interface]
> [ivy:retrieve] chained: Checking cache for: dependency: log4j#log4j;
> 1.2.8 {interface=[interface]}
> [ivy:retrieve] chained: module revision found in cache: log4j#log4j;
> 1.2.8
> [ivy:retrieve]  found log4j#log4j;1.2.8 in shared
> [ivy:retrieve] resolving dependencies for configuration 'server'
> [ivy:retrieve] == resolving dependencies for twc#mas-coredn-btm;working@
> flicker.local
>  [server]
> [ivy:retrieve] == resolving dependencies for twc#mas-coredn-btm;working@
> flicker.local
>  [interface]
> [ivy:retrieve] == resolving dependencies twc#mas-coredn-btm;working@
> flicker.local-
>  >log4j#log4j;1.2.8 [interface->interface]
> [ivy:retrieve] == resolving dependencies twc#mas-coredn-btm;working@
> flicker.local-
>  >jacorb#jacorb;2.2.2 [server->server]
> [ivy:retrieve] chained: Checking cache for: dependency: jacorb#jacorb;
> 2.2.2 {server=[server]}
> [ivy:retrieve] chained: module revision found in cache: jacorb#jacorb;
> 2.2.2
> [ivy:retrieve]  found jacorb#jacorb;2.2.2 in shared
> [ivy:retrieve]  resolved ivy file produced in
> /Users/neil/Business/SnowyRangeConsulting/projects/twc/thirdparty/ivy/cache/resolved-
> twc-mas-coredn-btm-working@flicker.local.xml
> [ivy:retrieve] :: downloading artifacts ::
> [ivy:retrieve] :: resolution report :: resolve 478ms :: artifacts dl 1ms
>
>  ---------------------------------------------------------------------
>        |                  |            modules            ||   artifacts
> |
>        |       conf       | number| search|dwnlded|evicted||
> number|dwnlded|
>
>  ---------------------------------------------------------------------
>        |     interface    |   1   |   0   |   0   |   0   ||   0   |   0
> |
>        |      server      |   2   |   0   |   0   |   0   ||   0   |   0
> |
>
>  ---------------------------------------------------------------------
> [ivy:retrieve] WARN:    ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve] WARN:    ::          UNRESOLVED DEPENDENCIES         ::
> [ivy:retrieve] WARN:    ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve] WARN:    :: log4j#log4j;1.2.8: configuration(s) not found
> in log4j#log4j;1.2.8: interface. It was required from twc#mas-coredn-
> btm;working@flicker.local interface
> [ivy:retrieve] WARN:    :: jacorb#jacorb;2.2.2: configuration(s) not
> found in jacorb#jacorb;2.2.2: server. It was required from twc#mas-
> coredn-btm;working@flicker.local server
> [ivy:retrieve] WARN:    ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]  report for twc#mas-coredn-btm;working@flicker.local
> interface produced in /Users/neil/Business/SnowyRangeConsulting/
> projects/twc/thirdparty/ivy/cache/twc-mas-coredn-btm-interface.xml
> [ivy:retrieve]  report for twc#mas-coredn-btm;working@flicker.local
> server produced in /Users/neil/Business/SnowyRangeConsulting/projects/
> twc/thirdparty/ivy/cache/twc-mas-coredn-btm-server.xml
> [ivy:retrieve]  resolve done (478ms resolve - 1ms download)
> [ivy:retrieve]
> [ivy:retrieve] :: problems summary ::
> [ivy:retrieve] :::: WARNINGS
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          :: log4j#log4j;1.2.8: configuration(s) not found
> in
> log4j#log4j;1.2.8: interface. It was required from
> twc#mas-coredn-btm;working@flicker.local
>  interface
> [ivy:retrieve]          :: jacorb#jacorb;2.2.2: configuration(s) not found
> in
> jacorb#jacorb;2.2.2: server. It was required from
> twc#mas-coredn-btm;working@flicker.local
>  server
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]
> [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
>
> I'm confused as to what's unresolved.  My goal is to have the ivy
> cachepath task output the following
>
> interface configuration would yield the log4j jar
> server configuration would yield both the log4j.jar and the jacorb.jar
> since the server configuration inherits from the interface.
>
> Thanks,
>
> Neil
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

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