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: Read from Maven local repository
Date Wed, 09 May 2007 21:24:31 GMT
First, could you please subscribe to the list, your messages are moderated
each time.

On 5/9/07, Fred Vos <fred@fredvos.org> wrote:
>
> On Wed, May 09, 2007 at 01:18:24AM +0200, Xavier Hanin wrote:
> > On 5/8/07, Fred Vos <fred@fredvos.org> wrote:
> [...]
> >
> > To get transitive dependencies Ivy need to get metadata about your
> modules,
> > so you have to configure your url resolver to tell where your module
> > descriptors (poms in your case) are. The name is misleading, but what
> you
> > actually need to do is add an ivy pattern to your url resolver:
> >   <url name="local-maven2" m2compatible="true">
> >     <ivy pattern="${local-maven2-pattern}"/>
> >     <artifact pattern="${local-maven2-pattern}"/>
> >   </url>
>
> I added this <ivy pattern line.
>
> >
> > and how to put all dependencies in the
> > >target/lib directory.
> >
> >
> > This is what the retrieve operation is for, you should have something
> like
> > that on the command line (if there isn't, open a JIRA issue).
>
> There is a retrieve operation in the command line. I used this command:
>
> % java -cp <classpath> -settings ivysettings.xml -retrieve
> "target/lib/[artifact]-[revision].[ext]"
>
> This does create a target/lib subdirectory and adds the two direct
> dependencies to this lib directory. That's a big step forward.
> Unfortunately
> it doesn't add the transitive dependencies. I don't see any warnings or
> errors. I tried adding a transitive="true" attribute to both dependencies
> in
> the ivy.xml file, but that doesn't help. Running the command with -verbose
> flag doesn't reveal any problem. Searched google to for any other clue,
> but
> couldn't find anythying.


You can use even -debug if verbose is not enough. The reason is usually that
Ivy doesn't find appropriate metadata. It may happen that this is only
cache's fault, so clean your cache and try again. If you still have trouble,
check your ivy cache after a resolve, and check the ivy file generated by
ivy for your dependencies. If they you see a default="true" attribute Ivy
has not found your pom. The debug log at least should tell which attempts
Ivy does.

One thing I think about, since you are using poms with an url resolver, it's
a good idea to tell ivy to use pom as extension. Replace your ivy pattern by
this one:
<ivy pattern="file:${user.home
}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision].pom
"/>

Last, I recommend using a file system resolver instead of an url one when
using file based repository. It allows to get revision listings.

HTH,

Xavier

Puzzled,
>
> Fred
>
> --
> |E  R
> | D  F
> |
> |fred at fredvos dot org
> |5235 DG 52 NL +31 73 6411833
>



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

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