ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Reynolds (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IVY-681) Ivy uses the first set of configurations it sees when resolving multiple versions of a module
Date Thu, 03 Apr 2008 20:35:24 GMT

    [ https://issues.apache.org/jira/browse/IVY-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585276#action_12585276
] 

Matt Reynolds commented on IVY-681:
-----------------------------------

The workaround, from the ivy user list, is to edit existing published ivy files to add a fallback
configuration.

>From Xavier:
I suggested to use fallback configurations, which are documented here:
http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency.html
(search for fallback)



> Ivy uses the first set of configurations it sees when resolving multiple versions of
a module
> ---------------------------------------------------------------------------------------------
>
>                 Key: IVY-681
>                 URL: https://issues.apache.org/jira/browse/IVY-681
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1
>            Reporter: John Hungerford
>             Fix For: 2.0
>
>         Attachments: ivy.zip
>
>
> When resolving two versions of a module, ivy uses the first configuration settings it
sees.
> The following example demonstrates the issue:
> Dependencies:
> #foo;1.0->{#commons-beanutils;1.6  #bar;1.1}
> #bar;1.1->#commons-beanutils;1.7.0
> Configurations:
> #commons-beanutils;1.6 - 'default' configuration extends 'master' and 'runtime'.  It
publishes its artifact in the master config.
> #commons-beanutils;1.7 - only has 'default' configuration.  It publishes its artifact
in the default config.
> When ivy resolves the default configuration of #commons-beanutils;1.7.0, it tries to
resolve the master and runtime configurations even though 1.7.0's default configuration doesn't
extend master or runtime.  1.6's default configuration does extended master and runtime, so
ivy isn't honoring the configuration settings for 1.7.0 when it evicts 1.6.
> Verbose output from ant:
> {code}
> Apache Ant version 1.6.5 compiled on June 2 2005
> Buildfile: C:\workspace\test-repo\build.xml
> parsing buildfile C:\workspace\test-repo\build.xml with URI = file:///C:/workspace/test-repo/build.xml
> Project base dir set to: C:\workspace\test-repo
> Build sequence for target(s) `ivy-resolve' is [ivy-install, ivy-resolve]
> Complete build sequence is [ivy-install, ivy-resolve, ivy-clean, ]
> ivy-install:
> parsing buildfile jar:file:/C:/workspace/test-repo/ivy-2.0.0-beta1.jar!/org/apache/ivy/ant/antlib.xml
with URI = jar:file:/C:/workspace/test-repo/ivy-2.0.0-beta1.jar!/org/apache/ivy/ant/antlib.xml
> ivy-resolve:
> Loading jar:file:/C:/workspace/test-repo/ivy-2.0.0-beta1.jar!/org/apache/ivy/core/settings/ivy.properties
> [ivy:resolve] :: Ivy 2.0.0-beta1 - 20071206070608 :: http://ant.apache.org/ivy/ ::
> :: loading settings :: file = C:\workspace\test-repo\ivysettings.xml
> no default ivy user dir defined: set to C:\Documents and Settings\hungerford_j\.ivy2
> no default cache defined: set to C:\Documents and Settings\hungerford_j\.ivy2\cache
> settings loaded (94ms)
> 	default cache: C:\workspace\test-repo\cache
> 	default resolver: local-test
> 	-- 1 resolvers:
> 	local-test [file]
> [ivy:resolve] using ivy parser to parse file:/C:/workspace/test-repo/ivy.xml
> [ivy:resolve] :: resolving dependencies :: acme#foo;1.0
> [ivy:resolve] 	confs: [default, master, runtime]
> [ivy:resolve] 	validate = true
> [ivy:resolve] resolving dependencies for configuration 'default'
> [ivy:resolve] == resolving dependencies for acme#foo;1.0 [default]
> [ivy:resolve] == resolving dependencies for acme#foo;1.0 [master]
> [ivy:resolve] == resolving dependencies for acme#foo;1.0 [runtime]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->apache#commons-beanutils;1.6
[runtime->default]
> [ivy:resolve] 		tried C:\workspace\test-repo/apache/commons-beanutils/ivys/ivy-1.6.xml
> [ivy:resolve] 	local-test: found md file for apache#commons-beanutils;1.6
> [ivy:resolve] 		=> C:\workspace\test-repo\apache\commons-beanutils\ivys\ivy-1.6.xml
(1.6)
> [ivy:resolve] downloading C:\workspace\test-repo\apache\commons-beanutils\ivys\ivy-1.6.xml
...
> [ivy:resolve] 	local-test: downloading C:\workspace\test-repo\apache\commons-beanutils\ivys\ivy-1.6.xml
> [ivy:resolve] 	[SUCCESSFUL ] apache#commons-beanutils;1.6!ivy.original.xml(ivy) (16ms)
> [ivy:resolve] 	found apache#commons-beanutils;1.6 in local-test
> [ivy:resolve] == resolving dependencies acme#foo;1.0->apache#commons-beanutils;1.6
[runtime->runtime]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->apache#commons-beanutils;1.6
[runtime->master]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->acme#bar;1.1 [runtime->default]
> [ivy:resolve] 		tried C:\workspace\test-repo/acme/bar/ivys/ivy-1.1.xml
> [ivy:resolve] 	local-test: found md file for acme#bar;1.1
> [ivy:resolve] 		=> C:\workspace\test-repo\acme\bar\ivys\ivy-1.1.xml (1.1)
> [ivy:resolve] downloading C:\workspace\test-repo\acme\bar\ivys\ivy-1.1.xml ...
> [ivy:resolve] 	local-test: downloading C:\workspace\test-repo\acme\bar\ivys\ivy-1.1.xml
> [ivy:resolve] 	[SUCCESSFUL ] acme#bar;1.1!ivy.original.xml(ivy) (16ms)
> [ivy:resolve] 	found acme#bar;1.1 in local-test
> [ivy:resolve] == resolving dependencies acme#foo;1.0->acme#bar;1.1 [runtime->master]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->acme#bar;1.1 [runtime->runtime]
> [ivy:resolve] == resolving dependencies acme#bar;1.1->apache#commons-beanutils;1.7.0
[runtime->default]
> [ivy:resolve] 		tried C:\workspace\test-repo/apache/commons-beanutils/ivys/ivy-1.7.0.xml
> [ivy:resolve] 	local-test: found md file for apache#commons-beanutils;1.7.0
> [ivy:resolve] 		=> C:\workspace\test-repo\apache\commons-beanutils\ivys\ivy-1.7.0.xml
(1.7.0)
> [ivy:resolve] downloading C:\workspace\test-repo\apache\commons-beanutils\ivys\ivy-1.7.0.xml
...
> [ivy:resolve] 	local-test: downloading C:\workspace\test-repo\apache\commons-beanutils\ivys\ivy-1.7.0.xml
> [ivy:resolve] 	[SUCCESSFUL ] apache#commons-beanutils;1.7.0!ivy.original.xml(ivy) (16ms)
> [ivy:resolve] 	found apache#commons-beanutils;1.7.0 in local-test
> [ivy:resolve] == resolving dependencies acme#bar;1.1->apache#commons-beanutils;1.7.0
[runtime->runtime]
> [ivy:resolve] == resolving dependencies acme#bar;1.1->apache#commons-beanutils;1.7.0
[runtime->master]
> [ivy:resolve] resolving dependencies for configuration 'master'
> [ivy:resolve] == resolving dependencies for acme#foo;1.0 [master]
> [ivy:resolve] resolving dependencies for configuration 'runtime'
> [ivy:resolve] == resolving dependencies for acme#foo;1.0 [runtime]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->apache#commons-beanutils;1.6
[runtime->default]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->apache#commons-beanutils;1.6
[runtime->runtime]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->apache#commons-beanutils;1.6
[runtime->master]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->acme#bar;1.1 [runtime->default]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->acme#bar;1.1 [runtime->master]
> [ivy:resolve] == resolving dependencies acme#foo;1.0->acme#bar;1.1 [runtime->runtime]
> [ivy:resolve] == resolving dependencies acme#bar;1.1->apache#commons-beanutils;1.7.0
[runtime->default]
> [ivy:resolve] == resolving dependencies acme#bar;1.1->apache#commons-beanutils;1.7.0
[runtime->runtime]
> [ivy:resolve] == resolving dependencies acme#bar;1.1->apache#commons-beanutils;1.7.0
[runtime->master]
> [ivy:resolve] 	resolved ivy file produced in C:\workspace\test-repo\cache\resolved-acme-foo-1.0.xml
> [ivy:resolve] :: downloading artifacts ::
> [ivy:resolve] 		tried C:\workspace\test-repo/acme/bar/jars/bar-1.1.jar
> [ivy:resolve] downloading C:\workspace\test-repo\acme\bar\jars\bar-1.1.jar ...
> [ivy:resolve] 	local-test: downloading C:\workspace\test-repo\acme\bar\jars\bar-1.1.jar
> [ivy:resolve] . (0kB)
> [ivy:resolve] 	[SUCCESSFUL ] acme#bar;1.1!bar.jar (0ms)
> [ivy:resolve] :: resolution report :: resolve 531ms :: artifacts dl 16ms
> [ivy:resolve] 	:: evicted modules:
> [ivy:resolve] 	apache#commons-beanutils;1.6 by [apache#commons-beanutils;1.7.0] in [runtime,
default]
> [ivy:resolve] 	  in acme#foo;1.0 with latest-revision
> [ivy:resolve] 	  in acme#foo;1.0 with latest-revision
> 	---------------------------------------------------------------------
> 	|                  |            modules            ||   artifacts   |
> 	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
> 	---------------------------------------------------------------------
> 	|      default     |   3   |   3   |   0   |   1   ||   1   |   1   |
> 	|      master      |   0   |   0   |   0   |   0   ||   0   |   0   |
> 	|      runtime     |   3   |   3   |   0   |   1   ||   1   |   1   |
> 	---------------------------------------------------------------------
> [ivy:resolve] WARN: 	::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve] WARN: 	::          UNRESOLVED DEPENDENCIES         ::
> [ivy:resolve] WARN: 	::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve] WARN: 	:: apache#commons-beanutils;1.7.0: configuration(s) not found in
apache#commons-beanutils;1.7.0: master. It was required from acme#bar;1.1 runtime
> [ivy:resolve] WARN: 	::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve] 	report for acme#foo;1.0 default produced in C:\workspace\test-repo\cache\acme-foo-default.xml
> [ivy:resolve] 	report for acme#foo;1.0 master produced in C:\workspace\test-repo\cache\acme-foo-master.xml
> [ivy:resolve] 	report for acme#foo;1.0 runtime produced in C:\workspace\test-repo\cache\acme-foo-runtime.xml
> [ivy:resolve] 	resolve done (531ms resolve - 16ms download)
> [ivy:resolve] :: problems summary ::
> [ivy:resolve] :::: WARNINGS
> [ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve] 		::          UNRESOLVED DEPENDENCIES         ::
> [ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve] 		:: apache#commons-beanutils;1.7.0: configuration(s) not found in apache#commons-beanutils;1.7.0:
master. It was required from acme#bar;1.1 runtime
> [ivy:resolve] 		::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:resolve] 
> [ivy:resolve] 
> [ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
> BUILD FAILED
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message