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 Bob Lee <cr...@crazybob.org> on 2011/05/27 07:51:57 UTC

Using Ivy from a custom module system

I'm trying to integrate Ivy into a custom module system. I'm using Ivy's API
directly. I want to use Ivy to resolve and download external dependencies
(which are declared in a custom way), but I *don't* want to use Ivy to
manage the internal modules and dependencies. I think this is similar to how
Gradle uses Ivy.

Basically, I just want to use Ivy to gather up any dependencies outside of
my project and to report any conflicts. I'm considering writing dummy Ivy
files (one per internal module) to a hidden directory and then running
Ivy. Is there a more elegant way I can implement this without writing XML
files, perhaps with a custom DependencyResolver or something?

Thanks,
Bob

Re: Using Ivy from a custom module system

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 27 mai 2011 à 07:51, Bob Lee a écrit :

> I'm trying to integrate Ivy into a custom module system. I'm using Ivy's API
> directly. I want to use Ivy to resolve and download external dependencies
> (which are declared in a custom way), but I *don't* want to use Ivy to
> manage the internal modules and dependencies. I think this is similar to how
> Gradle uses Ivy.
> 
> Basically, I just want to use Ivy to gather up any dependencies outside of
> my project and to report any conflicts. I'm considering writing dummy Ivy
> files (one per internal module) to a hidden directory and then running
> Ivy. Is there a more elegant way I can implement this without writing XML
> files, perhaps with a custom DependencyResolver or something?

You can use the plain Java API.
First get Ivy instance, see org.apache.Ivy#newInstance()
Then call ivy.resolve(moduledescriptor, options), moduledescriptor being the java model of an ivy.xml which you can build from scratch in Java.

Nicolas


Re: Using Ivy from a custom module system

Posted by Geoff Clitheroe <g....@gmail.com>.
Hi Bob

Total stab in the dark about what your end goal might be but
http://one-jar.sourceforge.net/

Cheers
Geoff
On May 27, 2011 5:52 PM, "Bob Lee" <cr...@crazybob.org> wrote:
> I'm trying to integrate Ivy into a custom module system. I'm using Ivy's
API
> directly. I want to use Ivy to resolve and download external dependencies
> (which are declared in a custom way), but I *don't* want to use Ivy to
> manage the internal modules and dependencies. I think this is similar to
how
> Gradle uses Ivy.
>
> Basically, I just want to use Ivy to gather up any dependencies outside of
> my project and to report any conflicts. I'm considering writing dummy Ivy
> files (one per internal module) to a hidden directory and then running
> Ivy. Is there a more elegant way I can implement this without writing XML
> files, perhaps with a custom DependencyResolver or something?
>
> Thanks,
> Bob