ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Coene <maarten_co...@yahoo.com>
Subject Re: Trying to build a local ivy repository
Date Wed, 02 Jun 2010 22:34:41 GMT
I believe it is a bug in Ivy.
I think I have a fix ready locally, but I need to test it first before I can commit it...

Maarten



----- Original Message ----
From: "Bailey, Darragh" <dbailey@hp.com>
To: "ivy-user@ant.apache.org" <ivy-user@ant.apache.org>
Sent: Wed, June 2, 2010 4:29:45 PM
Subject: RE: Trying to build a local ivy repository



> -----Original Message-----
> From: Bailey, Darragh 
> Sent: 01 June 2010 20:57
> To: ivy-user@ant.apache.org
> Subject: Trying to build a local ivy repository

<snip> 
> I tried switching to the ivysettings-basic.xml at this point 
> just to see if there was some issue with the namespace rules, 
> and I'm getting the same error.
<snip>

Retested this again, and I've no idea what I was doing before, but using the basic settings
file seems to work just fine.


So that means my problem is with the namespaces rules, but I don't know why it's getting the
following issue when using the namespace rules defined in the advanced settings file.

[ivy:install] :: problems summary ::
[ivy:install] :::: WARNINGS
[ivy:install]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install]           ::          UNRESOLVED DEPENDENCIES         ::
[ivy:install]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install]           :: org.apache.wink#wink-server;1.1-incubating: java.text.ParseException:
inconsistent module descriptor file found in 'http://repo1.maven.org/maven2/org/apache/apache/6/apache-6.pom':
bad organisation: expected='org.apache' found='apache';
[ivy:install]           ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:install] :::: ERRORS
[ivy:install]           libraries: bad organisation found in http://repo1.maven.org/maven2/org/apache/apache/6/apache-6.pom:
expected='org.apache' found='apache'
[ivy:install]
[ivy:install] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS


Is the problem here that the http://repo1.maven.org/maven2/org/apache/apache/6/apache-6.pom
is already in the layout that the rules are intended to translate to, so when working backwards
to get the parent pom files for the wink project using the advanced settings does a rule translation
from a working value to a broken value?

i.e. it takes the following data from http://repo1.maven.org/maven2/org/apache/wink/wink-server/1.1-incubating/wink-server-1.1-incubating.pom
    <parent>
        <groupId>org.apache</groupId>
        <artifactId>apache</artifactId>
        <version>6</version>
    </parent>

and converts the organisation using the namespace rules from 'org.apache' to 'apache' as the
organisation it's expecting to find in the maven2 repository.

I'm guessing that this could explain the layout of the files in the cache folder (I removed
advanced from the path):
cache/org.apache
cache/org.apache/apache
cache/org.apache/apache/ivydata-6.properties
cache/apache
cache/apache/apache
cache/apache/apache/ivydata-6.properties
cache/apache/apache/ivy-6.xml.original

Where as using the basic settings file produced the following:
cache/no-namespace/org.apache
cache/no-namespace/org.apache/apache
cache/no-namespace/org.apache/apache/ivydata-6.properties
cache/no-namespace/org.apache/apache/ivy-6.xml.original
cache/no-namespace/org.apache/apache/ivy-6.xml
cache/no-namespace/org.apache/apache/ivydata-1.properties
cache/no-namespace/org.apache/apache/ivy-1.xml.original
cache/no-namespace/org.apache/apache/ivy-1.xml

No apache/apache area.

What I think is happening is:
Ivy downloads the http://repo1.maven.org/maven2/org/apache/wink/wink/1.1-incubating/wink-1.1-incubating.pom
Works out that it requires http://repo1.maven.org/maven2/org/apache/apache/6/apache-6.pom
(specifed as a parent item in the above pom) but does a reverse translation on the organisation
for the local cache to get an org of apache even though it's pulling it from an org of org.apache
Downloads the apache-6.pom to cache/apache/apache/ivy-6.xml.original based on the namespace
rule
Then complains about finding the wrong org. I think the error message may be reversed, i.e.
complaing about finding 'apache' in the pom file when expecting 'org.apache', when it should
be saying finding 'org.apache' when expecting 'apache'.


So it looks to me that what's going wrong here is, it's doing a reverse rule lookup for the
local cache even though it's finding the pom file under the path described by the org before
the reverse translation. I think that either it should be complaining about not finding http://repo1.maven.org/maven2/apache/apache/6/apache-6.pom,
or not do the reverse rule lookup when it didn't need to use the namespace rule at the start.
The consequences of this partial translation appear to show up in the error message which
has the organisation entries in the wrong order.


Of course I could be completely wrong here, as I'm still trying to understand what rules of
the namespace are being used in this case. I would like to use the namespace idea so that
the common-* artifacts get placed under a org that is more consistent with the more recent
layout.

I'm not sure whether the behaviour above is due to a bug, or some rules in the advanced settings
file that are incorrect and I need to either strip them out or modify them to suit.

--
Regards,
Darragh Bailey

Systems Software Engineer
Hewlett Packard Galway Ltd.

Postal Address:    Hewlett Packard Galway Limited, Ballybrit Business Park, Galway
Registered Office: Hewlett Packard Galway Limited, 63-74 Sir John Rogerson's Quay Dublin 2
Registered Number: 361933 


      

Mime
View raw message