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 Juha Ranta <ju...@iki.fi> on 2008/03/01 00:20:49 UTC
Re: Continuous integration and deciding whether to build
I know pretty well what I'd like to do: check if there are any changes
in CVS or in the resolved dependencies since the last build, and if
there are, trigger a new build. However, there are kind of chicken and
egg problems because, for instance, to see if there are changes in the
dependencies, I need to do a resolve, and typically that resolve is
done during the Ant build task. It seems that to get this to work the
way I want, I'd need to insert the checking part inside the project's
Ant build, which complicates the build script, or else do one resolve
outside the Ant build and then another during the actual build.
I could also do it so that when a project finally does its Ivy
publish, it generates a buildlist from the leaf to the root and then
evokes the build scripts of those projects that depend on it, but this
leaf build never gets triggered if there is no other process polling
CVS..
I'll have to think about this more later, but not right now, since
it's Friday! Thanks to all for all of the help.
On 29.2.2008, at 23:56, Shawn Castrianni wrote:
> Here is link to that discussion:
>
> http://www.mail-archive.com/ivy-user@ant.apache.org/msg00185.html
>
>
> ---
> Shawn Castrianni
>
>
> -----Original Message-----
> From: Juha Ranta [mailto:juha.ranta@iki.fi]
> Sent: Friday, February 29, 2008 3:53 PM
> To: ivy-user@ant.apache.org
> Subject: Re: Continuous integration and deciding whether to build
>
>
> On 29.2.2008, at 23:37, Shawn Castrianni wrote:
>
>> You probably could somehow use the ivy:repreport task to get xml
>> version of reporting metadata about what versions are out there and
>> stuff. Then you could use the oopsconsultancy xmltask to scan the
>> xml report files to check if something has changed. Obviously,
>> there are a lot of details I am leaving out, but I did post a
>> previous message to this mailing list where I did something similar
>> and showed my ANT source code for it. I used the report task and
>> scanned the xml report file with the xmltask.
>
> Thanks! I'll look to it.
>
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain confidential
> and privileged information for the sole use of the intended
> recipient. Any review, use, distribution, or disclosure by others
> is strictly prohibited. If you are not the intended recipient (or
> authorized to receive information for the intended recipient),
> please contact the sender by reply e-mail and delete all copies of
> this message.
Re: Continuous integration and deciding whether to build
Posted by Xavier Hanin <xa...@gmail.com>.
Besides the chicken and egg problem and continuous integration server
integration which would in itself deserve a lot of discussion, since this is
something that is not addressed properly in any continuous integration
server AFAIK, for the question of knowing if your dependencies have changed
you may be able to use the ivy.deps.changed property that the resolve task
if dependencies have changed. But this require to use the same resolution
cache between each resolve process, which may be difficult on a continuous
integration server.
Otherwise I would go the way that has already been suggested, storing the
dependency report for comparison with the new one. If your dependency
metadata in the repository is using only fixed version, you can even limit
the first resolve (used only to know if something has changed) to the direct
dependencies (disable transitivity) to improve performance.
Xavier
On Sat, Mar 1, 2008 at 12:20 AM, Juha Ranta <ju...@iki.fi> wrote:
>
> I know pretty well what I'd like to do: check if there are any changes
> in CVS or in the resolved dependencies since the last build, and if
> there are, trigger a new build. However, there are kind of chicken and
> egg problems because, for instance, to see if there are changes in the
> dependencies, I need to do a resolve, and typically that resolve is
> done during the Ant build task. It seems that to get this to work the
> way I want, I'd need to insert the checking part inside the project's
> Ant build, which complicates the build script, or else do one resolve
> outside the Ant build and then another during the actual build.
>
> I could also do it so that when a project finally does its Ivy
> publish, it generates a buildlist from the leaf to the root and then
> evokes the build scripts of those projects that depend on it, but this
> leaf build never gets triggered if there is no other process polling
> CVS..
>
> I'll have to think about this more later, but not right now, since
> it's Friday! Thanks to all for all of the help.
>
> On 29.2.2008, at 23:56, Shawn Castrianni wrote:
>
> > Here is link to that discussion:
> >
> > http://www.mail-archive.com/ivy-user@ant.apache.org/msg00185.html
> >
> >
> > ---
> > Shawn Castrianni
> >
> >
> > -----Original Message-----
> > From: Juha Ranta [mailto:juha.ranta@iki.fi]
> > Sent: Friday, February 29, 2008 3:53 PM
> > To: ivy-user@ant.apache.org
> > Subject: Re: Continuous integration and deciding whether to build
> >
> >
> > On 29.2.2008, at 23:37, Shawn Castrianni wrote:
> >
> >> You probably could somehow use the ivy:repreport task to get xml
> >> version of reporting metadata about what versions are out there and
> >> stuff. Then you could use the oopsconsultancy xmltask to scan the
> >> xml report files to check if something has changed. Obviously,
> >> there are a lot of details I am leaving out, but I did post a
> >> previous message to this mailing list where I did something similar
> >> and showed my ANT source code for it. I used the report task and
> >> scanned the xml report file with the xmltask.
> >
> > Thanks! I'll look to it.
> >
> > ----------------------------------------------------------------------
> > This e-mail, including any attached files, may contain confidential
> > and privileged information for the sole use of the intended
> > recipient. Any review, use, distribution, or disclosure by others
> > is strictly prohibited. If you are not the intended recipient (or
> > authorized to receive information for the intended recipient),
> > please contact the sender by reply e-mail and delete all copies of
> > this message.
>
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/