Addition of conf="..." on own-organisation dependencies limits transitive 
resolve depth (and can break IvyDE).  Symptoms of various conf="xxx" settings 
detailed
----------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: IVY-1196
                 URL: https://issues.apache.org/jira/browse/IVY-1196
             Project: Ivy
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.1.0
         Environment: ant+ivy and IvyDE
            Reporter: Al
            Priority: Critical


The issue is that transitivity was infinite before the introduction of the 
conf="..." attribute on internal dependencies. After adding conf="*->*" 
transitivity is limited to a depth of 2. If I use conf="default->default" it 
limits to a depth of 1.

I'll detail here the conf="*->*" case. Specific issues with other conf 
attributes are detailed afterwards.

The project environment is as follows: (all projects are internal and not third 
part)
A -> B
B -> C
C -> D
D -> E

All projects specify these dependencies as 
<dependency org="myOrg" name="X" revision="SNAPSHOT" transitive="true" 
conf="*->*,!javadoc,!sources" />

and have 
<configuration>
 <conf name="default" visibility="public" transitive="true" />
 <conf name="test" visibility="public" transitive="true" />
</configuration>

NB: 'test' does not extend 'default'. Also, only artifacts for the conf  
'default' are built and published. I'm trying to sort out issues with the 
'default' conf before adding 'test' in to the mix... one thing at a time, eh.

Project E builds and publishes fine, no dependencies.
Project D builds and publishes fine, and resolves project E.
Project C builds and publishes fine, and resolves projects D and E
Project B builds and publishes fine, but resolves only projects C and D. 
IMPORTANT: Project B does NOT actually reference any class in project E.
Project A fails to build, and resolves only projects B and C. It DOES reference 
a class in project E.

(For those interested in specifics, project E is a common-utils project, D and 
C are api definitions and projects A and B both contain concrete 
implementations. this means that project E is missing both the common-utils 
project A and also an essential low-level API project B).

Some other potentially relevant details:

- All revisions are "SNAPSHOT" and those that publish definitely exist in the 
repository and are the most recent publications. (maven friendly requirements)
- Cleaning caches has no impact.
- I have a <module org="myOrg" name="*" resolveMode="dynamic" > entry in my 
settings.xml file.
- I've added !source and !javadoc for completeness, and don't know if it fails 
without them. If I remove them and leave only conf="*->*" the build will fail 
for lack of the javadoc and source jars. If this is the cause of the limited 
transitivity then I definitely think that's unexpected behaviour! Also, see my 
further tests on various conf settings, which should make it clear that the 
issue persists in other contexts as well. 


I have tried different conf settings on the dependencies. Here's what I get:

- setting conf="default->default", "*->default" or "default->@" leads to a 
transitive depth of just 1, and expected build errors as a result; classes in 
lower dependencies cannot be resolved
- setting conf="*->@" or conf="*->#" causes ant+ivy to exhibit the depth=2 
limited transitivity issue and IvyDE to break entirely with claims that unused 
confs in dependencies are "private" when in fact they are public (confirmed by 
ant+ivy treating them as such)

I can't think of any other things to test. 

Again, the main issue here is that there seems to be a limit on the depth of 
transitive dependency resolution depending on the conf="..." attribute's 
settings. This is unexpected behaviour, so I think qualifies as a bug.

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

Reply via email to