You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2007/01/28 16:27:17 UTC

Working in progress on using Ivy for the ant build

So, one of the things I've been playing around with in my
oh-so-copious spare time is making the Abdera build use Ivy to
download its dependencies instead of the current hardcoded system
we've currently got in the ant build.  I've sort of been feeling my
way around, as I haven't been able to find very many good examples of
how to set up multiple module builds in a single source tree with Ivy,
but yesterday I came up with something pretty nice, so I figured I'd
post a patch to see what people think.

Note that this isn't done.  It only builds the core, parser, protocol,
client, and extensions modules, and it doesn't have anything set up
for publishing releases, doing retroweaver junk, etc.

It's also not taking full advantage of Ivy's abilities, we should be
using different configurations for things like saying that the junit
stuff is only needed for tests, and splitting out big dependencies
like jaxen (which appears to pull in the whole bloody world) so that
you only get that if you're actually using it.  Finally, there's too
much duplication of code in the module's build.xml files, I'd like a
solution to that that either generates them from a common template or
has them pull in the code they need from an external source, but I
haven't gotten around to thinking about the best way to do that (it's
just screaming for the import ant task, but that has "Beta Code, Stay
Away" written all over it).

A bit about how the build is structured.  There's a top level
build.xml file that just handles bootstrapping ivy and then calls each
module's build.xml.  In each module there's the actual logic for doing
the builds and for handling dependency resolution.  When each module's
build is complete it is published into a local ivy repository so that
modules that depend on it can access it.  Assuming that you've
bootstrapped ivy once it's possible to build modules independently of
each other (just cd into core and type 'ant', for example), although
you need to make sure its dependencies have already been built.

The only things that actually vary for each module is the name of the
project in the build.xml file and it's ivy.xml file, which is where
you actually specify dependencies and things like that.  The top level
ivyconf.xml configures Ivy to use the maven2 repos at repo1.maven.org
and the incubator maven2 repository on people.apache.org, although at
this point that isn't used for anything, it's just a hold over because
the project I copied this logic from (the speedyfeed lab) used that to
depend on Abdera itself

Anyway, here's the current work in progress patch, in case anyone else
is curious.  I'm not sure when I'm going to find some free time to
continue this work, but hopefully it'll happen eventually.  Let me
know what you think.

-garrett

Re: Working in progress on using Ivy for the ant build

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 2/5/07, James M Snell <ja...@gmail.com> wrote:
> This looks fine to me.

Just adding some comments I made to James over GTalk, just in case
anyone else is curious what the status is on this stuff.

It's basically working, but needs to be extended to cover the rest of
the modules in the tree, and there are some things our current ant
based build does that this would need to replicate before we could
switch over.

After that's done there would certainly be things that could be
improved, but there's no reason that couldn't be worked on in the
tree, so things could certainly be checked in.

I don't have time to work on this right now, but hopefully I'll get a
chance to work on it some time in the next few weeks.  In the
meantime, nobody hold off on anything else (other build changes,
releases, etc) waiting for this, because I'm really not sure when that
time is going to materialize ;-)

-garrett

Re: Working in progress on using Ivy for the ant build

Posted by James M Snell <ja...@gmail.com>.
This looks fine to me.

- James

Garrett Rooney wrote:
> So, one of the things I've been playing around with in my
> oh-so-copious spare time is making the Abdera build use Ivy to
> download its dependencies instead of the current hardcoded system
> we've currently got in the ant build.  I've sort of been feeling my
> way around, as I haven't been able to find very many good examples of
> how to set up multiple module builds in a single source tree with Ivy,
> but yesterday I came up with something pretty nice, so I figured I'd
> post a patch to see what people think.
> 
> Note that this isn't done.  It only builds the core, parser, protocol,
> client, and extensions modules, and it doesn't have anything set up
> for publishing releases, doing retroweaver junk, etc.
> 
> It's also not taking full advantage of Ivy's abilities, we should be
> using different configurations for things like saying that the junit
> stuff is only needed for tests, and splitting out big dependencies
> like jaxen (which appears to pull in the whole bloody world) so that
> you only get that if you're actually using it.  Finally, there's too
> much duplication of code in the module's build.xml files, I'd like a
> solution to that that either generates them from a common template or
> has them pull in the code they need from an external source, but I
> haven't gotten around to thinking about the best way to do that (it's
> just screaming for the import ant task, but that has "Beta Code, Stay
> Away" written all over it).
> 
> A bit about how the build is structured.  There's a top level
> build.xml file that just handles bootstrapping ivy and then calls each
> module's build.xml.  In each module there's the actual logic for doing
> the builds and for handling dependency resolution.  When each module's
> build is complete it is published into a local ivy repository so that
> modules that depend on it can access it.  Assuming that you've
> bootstrapped ivy once it's possible to build modules independently of
> each other (just cd into core and type 'ant', for example), although
> you need to make sure its dependencies have already been built.
> 
> The only things that actually vary for each module is the name of the
> project in the build.xml file and it's ivy.xml file, which is where
> you actually specify dependencies and things like that.  The top level
> ivyconf.xml configures Ivy to use the maven2 repos at repo1.maven.org
> and the incubator maven2 repository on people.apache.org, although at
> this point that isn't used for anything, it's just a hold over because
> the project I copied this logic from (the speedyfeed lab) used that to
> depend on Abdera itself
> 
> Anyway, here's the current work in progress patch, in case anyone else
> is curious.  I'm not sure when I'm going to find some free time to
> continue this work, but hopefully it'll happen eventually.  Let me
> know what you think.
> 
> -garrett

Re: Working in progress on using Ivy for the ant build

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 1/28/07, Stephen Duncan <st...@gmail.com> wrote:
> Can you resend the patch, it doesn't seem to have made it with your e-mail. ;)

Oops.  Here it is.

I also stuck a copy up on the web in case this doesn't work...

http://people.apache.org/~rooneg/abdera-ivy-wip.diff

-garrett

Re: Working in progress on using Ivy for the ant build

Posted by Stephen Duncan <st...@gmail.com>.
Can you resend the patch, it doesn't seem to have made it with your e-mail. ;)

-Stephen

On 1/28/07, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> So, one of the things I've been playing around with in my
> oh-so-copious spare time is making the Abdera build use Ivy to
> download its dependencies instead of the current hardcoded system
> we've currently got in the ant build.  I've sort of been feeling my
> way around, as I haven't been able to find very many good examples of
> how to set up multiple module builds in a single source tree with Ivy,
> but yesterday I came up with something pretty nice, so I figured I'd
> post a patch to see what people think.
>
> Note that this isn't done.  It only builds the core, parser, protocol,
> client, and extensions modules, and it doesn't have anything set up
> for publishing releases, doing retroweaver junk, etc.
>
> It's also not taking full advantage of Ivy's abilities, we should be
> using different configurations for things like saying that the junit
> stuff is only needed for tests, and splitting out big dependencies
> like jaxen (which appears to pull in the whole bloody world) so that
> you only get that if you're actually using it.  Finally, there's too
> much duplication of code in the module's build.xml files, I'd like a
> solution to that that either generates them from a common template or
> has them pull in the code they need from an external source, but I
> haven't gotten around to thinking about the best way to do that (it's
> just screaming for the import ant task, but that has "Beta Code, Stay
> Away" written all over it).
>
> A bit about how the build is structured.  There's a top level
> build.xml file that just handles bootstrapping ivy and then calls each
> module's build.xml.  In each module there's the actual logic for doing
> the builds and for handling dependency resolution.  When each module's
> build is complete it is published into a local ivy repository so that
> modules that depend on it can access it.  Assuming that you've
> bootstrapped ivy once it's possible to build modules independently of
> each other (just cd into core and type 'ant', for example), although
> you need to make sure its dependencies have already been built.
>
> The only things that actually vary for each module is the name of the
> project in the build.xml file and it's ivy.xml file, which is where
> you actually specify dependencies and things like that.  The top level
> ivyconf.xml configures Ivy to use the maven2 repos at repo1.maven.org
> and the incubator maven2 repository on people.apache.org, although at
> this point that isn't used for anything, it's just a hold over because
> the project I copied this logic from (the speedyfeed lab) used that to
> depend on Abdera itself
>
> Anyway, here's the current work in progress patch, in case anyone else
> is curious.  I'm not sure when I'm going to find some free time to
> continue this work, but hopefully it'll happen eventually.  Let me
> know what you think.
>
> -garrett
>
>


-- 
Stephen Duncan Jr
www.stephenduncanjr.com

Re: Working in progress on using Ivy for the ant build

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 1/28/07, Emmanuel Lecharny <el...@gmail.com> wrote:
> Garrett Rooney a écrit :
> Hi Garett,
>
> > So, one of the things I've been playing around with in my
> > oh-so-copious spare time is making the Abdera build use Ivy to
> > download its dependencies instead of the current hardcoded system
> > we've currently got in the ant build.  I've sort of been feeling my
> > way around, as I haven't been able to find very many good examples of
> > how to set up multiple module builds in a single source tree with Ivy
>
>
> just FYI, and in cxase it can help you, we have a running project using
> ivy + ant in Apache Directory project : LdapStudio. Here is the link to it :
> http://svn.apache.org/repos/asf/directory/ldapstudio/trunk/
>
> Here is the help about how to build this project :
> http://cwiki.apache.org/DIRxSTUDIO/building.html
>
> If you have any question, just feel free to mail us.

Thank you very much.  I'll be sure to take a closer look at this once
more free time presents itself.

-garrett

Re: Working in progress on using Ivy for the ant build

Posted by Emmanuel Lecharny <el...@gmail.com>.
Garrett Rooney a écrit :
Hi Garett,

> So, one of the things I've been playing around with in my
> oh-so-copious spare time is making the Abdera build use Ivy to
> download its dependencies instead of the current hardcoded system
> we've currently got in the ant build.  I've sort of been feeling my
> way around, as I haven't been able to find very many good examples of
> how to set up multiple module builds in a single source tree with Ivy


just FYI, and in cxase it can help you, we have a running project using 
ivy + ant in Apache Directory project : LdapStudio. Here is the link to it :
http://svn.apache.org/repos/asf/directory/ldapstudio/trunk/

Here is the help about how to build this project :
http://cwiki.apache.org/DIRxSTUDIO/building.html

If you have any question, just feel free to mail us.

Emmanuel.