You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Jean-Baptiste Quenot <jb...@apache.org> on 2007/05/11 18:51:54 UTC

How to specify the resolver used in ?

Hi there,

I'm  trying to  use <ivy:repreport>  with  Ivy 1.4.1  and I  don't
understand where  it looks for  dependencies.  I have  the feeling
that it looks in the first resolver defined in ivyconf.xml.

This feeling is confirmed by the fact that in the generated
ivy-repository-report.xml there is mention of my defaultResolver:

<module organisation="org" name="mozilla" resolver="default-chain">
                                          ^^^^^^^^^^^^^^^^^^^^^^^^

Any idea?  Either it's missing from the documentation, or
the feature does not exist (yet).

Cheers,
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

Re: How to specify the resolver used in ?

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Xavier Hanin:

> On 5/12/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
>
> > But still there's something wrong because all the dependencies
> > that have an organisation name with more than one level cannot
> > be resolved.
>
> Mmm, ok, you're right. The listing mechanism used in Ivy has not
> been updated to deal with maven 2 repositories layout. <snip/> I
> suggest you  open a JIRA  issue for that "maven  2 organizations
> with dots not supported in organization listing"

Done:

repreport task not working with m2compatible repository
https://issues.apache.org/jira/browse/IVY-503

Cheers!
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

Re: How to specify the resolver used in ?

Posted by Xavier Hanin <xa...@gmail.com>.
On 5/12/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
>
> * Xavier Hanin:
> > On 5/11/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
> > >
> >
> > > I'm  trying to  use <ivy:repreport>  with  Ivy 1.4.1  and I  don't
> > > understand where  it looks for  dependencies.  I have  the feeling
> > > that it looks in the first resolver defined in ivyconf.xml.
> >
> >
> > It's not the first one, it's the default one.
> >
> > <snip/>
> >
> > Indeed, it uses regular ivy settings: it means that it will take the
> default
> > resolver for modules which do not have any specific settings, and the
> > specific settings for others.
>
> Indeed that makes sense.  But still there's something wrong
> because all the dependencies that have an organisation name with
> more than one level cannot be resolved.
>
> This is a working example:
>
>     <module organisation="opensymphony" name="quartz"
> resolver="default-chain">
>       <revision name="1.5.2" status="release" pubdate="20060518223108"
> resolver="external" artresolver="external" homepage="
> http://www.opensymphony.com/quartz/" downloaded="false" searched="true"
> default="false" conf="compile, default" position="100">
>         <caller organisation="caller" name="all-caller" conf="default"
> rev="latest.integration"/>
>         <artifacts>
>         </artifacts>
>       </revision>
>     </module>
>
> This is an example of failure:
>
>     <module organisation="org" name="apache" resolver="default-chain">
>       <revision name="latest.integration" error="not found"
> downloaded="false" searched="false" conf="" position="-1">
>         <caller organisation="caller" name="all-caller" conf="default"
> rev="latest.integration"/>
>         <artifacts>
>         </artifacts>
>       </revision>
>     </module>
>
> So Ivy doesn't seem to be able to resolve organisations with dots,
> like org.apache...


Mmm, ok, you're right. The listing mechanism used in Ivy has not been
updated to deal with maven 2 repositories layout. The way Ivy deal with
repository listing is based on listing directories, and it's pretty
difficult to get a good listing based only on directories with maven 2
layout and dot conversions. Well, it's not that difficult, but I'm afraid it
would be very slow, since we would have to check the subdirectories to see
if they are module directories or another part in a dot separated
organization name. All of this taking into account the configured repository
pattern, which may or may not have a module token after the orgnization
token.

I suggest you open a JIRA issue for that "maven 2 organizations with dots
not supported in organization listing", and hope someone provides a patch
:-)

Xavier

--
>      Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/
>



-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Re: How to specify the resolver used in ?

Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Xavier Hanin:
> On 5/11/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
> >
> 
> > I'm  trying to  use <ivy:repreport>  with  Ivy 1.4.1  and I  don't
> > understand where  it looks for  dependencies.  I have  the feeling
> > that it looks in the first resolver defined in ivyconf.xml.
> 
> 
> It's not the first one, it's the default one.
>
> <snip/>
> 
> Indeed, it uses regular ivy settings: it means that it will take the default
> resolver for modules which do not have any specific settings, and the
> specific settings for others.

Indeed that makes sense.  But still there's something wrong
because all the dependencies that have an organisation name with
more than one level cannot be resolved.

This is a working example:

    <module organisation="opensymphony" name="quartz" resolver="default-chain">
      <revision name="1.5.2" status="release" pubdate="20060518223108" resolver="external" artresolver="external" homepage="http://www.opensymphony.com/quartz/" downloaded="false" searched="true" default="false" conf="compile, default" position="100">
        <caller organisation="caller" name="all-caller" conf="default" rev="latest.integration"/>
        <artifacts>
        </artifacts>
      </revision>
    </module>

This is an example of failure:

    <module organisation="org" name="apache" resolver="default-chain">
      <revision name="latest.integration" error="not found" downloaded="false" searched="false" conf="" position="-1">
        <caller organisation="caller" name="all-caller" conf="default" rev="latest.integration"/>
        <artifacts>
        </artifacts>
      </revision>
    </module>

So Ivy doesn't seem to be able to resolve organisations with dots,
like org.apache...
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

Re: How to specify the resolver used in ?

Posted by Xavier Hanin <xa...@gmail.com>.
On 5/11/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
>
> Hi there,


Salut Jean-Baptiste !

I'm  trying to  use <ivy:repreport>  with  Ivy 1.4.1  and I  don't
> understand where  it looks for  dependencies.  I have  the feeling
> that it looks in the first resolver defined in ivyconf.xml.


It's not the first one, it's the default one.

This feeling is confirmed by the fact that in the generated
> ivy-repository-report.xml there is mention of my defaultResolver:
>
> <module organisation="org" name="mozilla" resolver="default-chain">
>                                           ^^^^^^^^^^^^^^^^^^^^^^^^
>
> Any idea?  Either it's missing from the documentation, or
> the feature does not exist (yet).


Indeed, it uses regular ivy settings: it means that it will take the default
resolver for modules which do not have any specific settings, and the
specific settings for others.
Actually the repreport is implemented in a very basic way:  it list all
modules in Ivy using Ivy#listModules method (which in turn delegate its job
to resolvers), then ask Ivy to resolve all latest versions of all these
modules. That's all! But you can open a JIRA issue if you want something
better.

Xavier

Cheers,
> --
>      Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/
>



-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/