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 smu <sa...@delfi.lt> on 2007/04/02 21:09:11 UTC

Re: Common dependencies

Hi,

Thanks for this idea. I just did this way - declared common libraries in one
modulies and made all other modules dependant on it. Also what I did -
almost all external dependencies I declared with transtive=false. Otherwise
you will receive huge bunch of unnecessary jars.

BTW ibiblio resolver is not currect (maven2) - it doesn't undestand
'project.name' properties - you have to correct them yourself.

Bye,
Saulius


Xavier Hanin wrote:
> 
> On 3/27/07, smu <sa...@delfi.lt> wrote:
>>
>>
>> Hi,
>>
>> I'm trying to migrate to ivy from maven and have one question. Is it
>> possible to create some common dependencies for multimodule project?
>> Something like parent and child pom.xml in maven2. For example, I'm using
>> Spring in almost all modules but don't want to declare it in every module
>> (as in case of version change I will have to update all ivy.xml files).
>> Is
>> it possible to do with ivy?
> 
> 
> Ivy do not support parent/child like maven, but you can do something very
> similar by using virtual module. A virtual module is a module which
> publishes no artifact at all (put an empty publication section in its ivy
> file, since no publication element at all is equivalent to publishing one
> jar artifact).
> 
> Then when you declare a dependency on it, you will transitively get all
> its
> dependencies, and only its dependencies since it doesn't publish any
> artifact.
> The advantage is that you can obviously declare multiple dependencies like
> that, so you are not limited to single level inheritance of maven
> parent/child mechanism.
> 
> HTH,
> 
> - Xavier
> 
> Thanks,
>> Saulius
>> --
>> View this message in context:
>> http://www.nabble.com/Common-dependencies-tf3473658.html#a9694201
>> Sent from the ivy-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Common-dependencies-tf3473658.html#a9797003
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Common dependencies

Posted by Xavier Hanin <xa...@gmail.com>.
On 4/3/07, smu <sa...@delfi.lt> wrote:
>
>
> Hi,
>
> >
> http://www.nabble.com/ibiblio-resolver-and-optional-pom-dependencies-tf3497317.html
>
> Thanks - I will have it in mind.
>
> > This seems to be a bug. Could you give more details (like pointing to a
> > pom
> > using project.name, or pointing to a maven doc page explaining how we
> > should
>
> Sorry, it was my mistake. i had in mind {project.groupId} and
> {project.version}.
>
> When version 2.0 is going to be released?


We are currently preparing the release of a first 2.0 alpha version which
shouldn't be too long to come... but we won't strongly encourage to migrate,
since it will only be an alpha version. It's difficult to give an ETA for an
open source project developed only by volunteers, so I can't really say much
more for the moment. Subscribe to the dev mailing list if you want to get
regular updates on our progress.

BTW is it possible to receive all posts in this forum to email? I subscribed
> to ivy mailing lists (using email) but still don't receive new posts. I
> tried to subscribe 2 times but didn't receive any response.


Yes, it's a mailing list to which nabble is only giving another interface.
How did you subscribe? It happens from time to time that apache mailing
lists daemons have issues to subscribe new users, so try again and you may
get luckier this time :-)

- Xavier

Bye,
> Saulius
>
> > Saulius
> >
> >
> > Xavier Hanin wrote:
> > >
> > > On 3/27/07, smu <sa...@delfi.lt> wrote:
> > >>
> > >>
> > >> Hi,
> > >>
> > >> I'm trying to migrate to ivy from maven and have one question. Is it
> > >> possible to create some common dependencies for multimodule project?
> > >> Something like parent and child pom.xml in maven2. For example, I'm
> > using
> > >> Spring in almost all modules but don't want to declare it in every
> > module
> > >> (as in case of version change I will have to update all ivy.xmlfiles).
> > >> Is
> > >> it possible to do with ivy?
> > >
> > >
> > > Ivy do not support parent/child like maven, but you can do something
> > very
> > > similar by using virtual module. A virtual module is a module which
> > > publishes no artifact at all (put an empty publication section in its
> > ivy
> > > file, since no publication element at all is equivalent to publishing
> > one
> > > jar artifact).
> > >
> > > Then when you declare a dependency on it, you will transitively get
> all
> > > its
> > > dependencies, and only its dependencies since it doesn't publish any
> > > artifact.
> > > The advantage is that you can obviously declare multiple dependencies
> > like
> > > that, so you are not limited to single level inheritance of maven
> > > parent/child mechanism.
> > >
> > > HTH,
> > >
> > > - Xavier
> > >
> > > Thanks,
> > >> Saulius
> > >> --
> > >> View this message in context:
> > >> http://www.nabble.com/Common-dependencies-tf3473658.html#a9694201
> > >> Sent from the ivy-user mailing list archive at Nabble.com.
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Common-dependencies-tf3473658.html#a9797003
> > Sent from the ivy-user mailing list archive at Nabble.com.
> >
> >
>
>
> --
> Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
> Manage your dependencies with Ivy!
> http://incubator.apache.org/ivy/
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Common-dependencies-tf3473658.html#a9809708
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>


-- 
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Re: Common dependencies

Posted by smu <sa...@delfi.lt>.
Hi,

> http://www.nabble.com/ibiblio-resolver-and-optional-pom-dependencies-tf3497317.html

Thanks - I will have it in mind.

> This seems to be a bug. Could you give more details (like pointing to a
> pom
> using project.name, or pointing to a maven doc page explaining how we
> should

Sorry, it was my mistake. i had in mind {project.groupId} and
{project.version}.

When version 2.0 is going to be released?

BTW is it possible to receive all posts in this forum to email? I subscribed
to ivy mailing lists (using email) but still don't receive new posts. I
tried to subscribe 2 times but didn't receive any response.

Bye,
Saulius

> Saulius
>
>
> Xavier Hanin wrote:
> >
> > On 3/27/07, smu <sa...@delfi.lt> wrote:
> >>
> >>
> >> Hi,
> >>
> >> I'm trying to migrate to ivy from maven and have one question. Is it
> >> possible to create some common dependencies for multimodule project?
> >> Something like parent and child pom.xml in maven2. For example, I'm
> using
> >> Spring in almost all modules but don't want to declare it in every
> module
> >> (as in case of version change I will have to update all ivy.xml files).
> >> Is
> >> it possible to do with ivy?
> >
> >
> > Ivy do not support parent/child like maven, but you can do something
> very
> > similar by using virtual module. A virtual module is a module which
> > publishes no artifact at all (put an empty publication section in its
> ivy
> > file, since no publication element at all is equivalent to publishing
> one
> > jar artifact).
> >
> > Then when you declare a dependency on it, you will transitively get all
> > its
> > dependencies, and only its dependencies since it doesn't publish any
> > artifact.
> > The advantage is that you can obviously declare multiple dependencies
> like
> > that, so you are not limited to single level inheritance of maven
> > parent/child mechanism.
> >
> > HTH,
> >
> > - Xavier
> >
> > Thanks,
> >> Saulius
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Common-dependencies-tf3473658.html#a9694201
> >> Sent from the ivy-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Common-dependencies-tf3473658.html#a9797003
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>


-- 
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/



-- 
View this message in context: http://www.nabble.com/Common-dependencies-tf3473658.html#a9809708
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Common dependencies

Posted by Xavier Hanin <xa...@gmail.com>.
On 4/2/07, smu <sa...@delfi.lt> wrote:
>
>
> Hi,
>
> Thanks for this idea. I just did this way - declared common libraries in
> one
> modulies and made all other modules dependant on it. Also what I did -
> almost all external dependencies I declared with transtive=false.
> Otherwise
> you will receive huge bunch of unnecessary jars.


If you're using maven2 compatibility, you may get a 'huge bunch of
unnecessary jars' because of your configuration mapping. See this recent
thread:
http://www.nabble.com/ibiblio-resolver-and-optional-pom-dependencies-tf3497317.html

BTW ibiblio resolver is not currect (maven2) - it doesn't undestand
> 'project.name' properties - you have to correct them yourself.


This seems to be a bug. Could you give more details (like pointing to a pom
using project.name, or pointing to a maven doc page explaining how we should
resolve project.name? Indeed we already fixed some properties:
https://issues.apache.org/jira/browse/IVY-425

Thanks for your feedback!

- Xavier

Bye,
> Saulius
>
>
> Xavier Hanin wrote:
> >
> > On 3/27/07, smu <sa...@delfi.lt> wrote:
> >>
> >>
> >> Hi,
> >>
> >> I'm trying to migrate to ivy from maven and have one question. Is it
> >> possible to create some common dependencies for multimodule project?
> >> Something like parent and child pom.xml in maven2. For example, I'm
> using
> >> Spring in almost all modules but don't want to declare it in every
> module
> >> (as in case of version change I will have to update all ivy.xml files).
> >> Is
> >> it possible to do with ivy?
> >
> >
> > Ivy do not support parent/child like maven, but you can do something
> very
> > similar by using virtual module. A virtual module is a module which
> > publishes no artifact at all (put an empty publication section in its
> ivy
> > file, since no publication element at all is equivalent to publishing
> one
> > jar artifact).
> >
> > Then when you declare a dependency on it, you will transitively get all
> > its
> > dependencies, and only its dependencies since it doesn't publish any
> > artifact.
> > The advantage is that you can obviously declare multiple dependencies
> like
> > that, so you are not limited to single level inheritance of maven
> > parent/child mechanism.
> >
> > HTH,
> >
> > - Xavier
> >
> > Thanks,
> >> Saulius
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Common-dependencies-tf3473658.html#a9694201
> >> Sent from the ivy-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Common-dependencies-tf3473658.html#a9797003
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>


-- 
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/