[Anthill] Projects not building in default schedule
Priest, Mark
mpriest at 3eti.com
Mon Apr 25 15:27:20 CDT 2005
Forwarding to the list. I am not aware of a way to turn off building to the
working directory other than to always write to the publishDir. I have not
used porevious version of Anthill. Maybe the right solution is to change
the way Anthill uses the cvs log command. For example, having Anthill
iterate through directories and skip ones which aren't under cvs control.
-----Original Message-----
From: Jonny 'Bender' Holloway [mailto:jonathan.holloway at gmail.com]
Sent: Monday, April 25, 2005 12:10 PM
To: Priest, Mark
Subject: Re: [Anthill] Projects not building in default schedule
Ok, great that's a start so the dist directory doesn't egt put there,
however, I also have a build directory for temporary classes and a
WEB-INF folder where compiled JSP's are put. Is there a way to turn
off building in the work directory completely that anyone knows of? I
thought previous versions of anthill didn't build projects here...
Many thanks,
Jon.
On 4/22/05, Priest, Mark <mpriest at 3eti.com> wrote:
> Jonathan,
>
> There may be a way around this problem for you. It looks like you are
> intending to create a dist directory for your build products which
includes
> the actual final build products along with some supporting files. If you
> write the build products to the publish directory of Anthill then you will
> not run into the problem since that is outside the working directory
Anthill
> uses to checkout and log the project.
>
> What I do is explicitly define the publish directory property in my build
> script. I don't have my scripts available right now but I think the name
of
> the property is "publishDir". So I do something like this in my build
> script:
>
> <!-- This is overriden by Anthill -->
> <property name="publishDir value="dist"/>
>
> I set the publishDir property to "dist" in my script and then build within
> that directory. When the build is run from the command line rather than
> through Anthill it creates and populates the dist directory as you intend.
> When it is run in Anthill then Anthill passes the publishDir property to
Ant
> on the command line. The command-line property overrides my hard-coded
> value thanks to the magic of Ant. So when I run it in Anthill it goes to
> the publishDir on the Anthill server rather than to the dist directory in
> the working directory. This solves the Anthill problem because now
nothing
> new is created in the working directory.
>
> This means that your Anthill output will now be accessable from the
Anthill
> webpage link. Your users, however, will still see the output in dist. I
> hoope this helps.
>
> -Mark
>
>
> -----Original Message-----
> From: Jonathan Holloway [mailto:jonathan.holloway at gmail.com]
> Sent: Friday, April 22, 2005 4:08 AM
> To: Priest, Mark; anthill at lists.urbancode.com
> Subject: Re: [Anthill] Projects not building in default schedule
>
> This is fine if you have temporary directories that are used to build
> classes but if you actually have files (e.g. config files) that are
> required to be copied to a particular place because class files
> depend on them then it all goes to pot. I don't think there is a way
> to specify exclude directories to the cvs log command so we're in a
> bit of a muddle here with anthill, is there anyway around this
> problem?
>
> Cheers,
> Jon.
>
> On 4/22/05, Priest, Mark <mpriest at 3eti.com> wrote:
> > I'm afraid the original post was correct. The proble he is describing I
> > have also experienced with Anthill. The problem is that the cvs log
> command
> > fails if the build process creates any new directories in the working
> > directory during the build. For example, if I create a classes
directory
> > for compilation and I leave it there after the build then the next
Anthill
> > build will with this error.
> > This is actually the default behavior of cvs log. You would see the
same
> > error if you ran cvs directly.
> >
> > The work-around is that your build script must delete any directories
that
> > it creates as part of the build process. What I do is clean up after
> every
> > build so that when the ant script completes there is nothing left in the
> > working directory that is not already in cvs. Typically, I create a
> > temporary directory and all of my intermediate build products go there.
> The
> > only safe thing to "permanently" create is something in the publish
> > directory that Anthill passes to you since that is outside of the
working
> > directory.
> >
> > This is actually a pretty annoying aspect of Anthill since every build
> takes
> > a long time. I cannot keep intermediate build products between builds
> > because of this so I have to recompile classes that have not changed.
> >
> > -Mark
> >
> >
> > -----Original Message-----
> > From: Erik Husby [mailto:mhusby at broad.mit.edu]
> > Sent: Thursday, April 21, 2005 2:38 PM
> > To: Jonathan Holloway; Anthill user list
> > Subject: Re: [Anthill] Projects not building in default schedule
> >
> > Jonathan Holloway wrote:
> >
> > >I've solved the problem here, it relates to the getRevisionsSince.sh
> > >script under conf/profiles which has the following:
> > >
> > >#!/bin/bash
> > >echo "Executing: cd $1"
> > >cd $1
> > >echo "Executing: cvs -d $2 log $3\"$4 $5 $6\" $7 $8"
> > >cvs -d $2 log $3"$4 $5 $6" $7 $8
> > >
> > >If I comment this out I obviously don't get the revisons (hence the
> > >original email). However if this is left as default (like the above)
> > >then when the anthill build finishes for the project the following
> > >exception is thrown:
> > >
> > >17:26:29:690 [Thread - AnthillBuildDaemon] INFO
> > >com.urbancode.anthill.adapter.CVSRepositoryAdap
> > >ter - Get revisions since command:
> > >
> > >sh /var/progs/anthill2/conf/profiles/Unix/unix_cvs/getRevisionsSince.sh
> > >/var/progs/anthill2/work
> > >/pcas-core /home/cvs -d >2005-02-23 12:43:24 GMT -rHEAD -N
> > >
> > >cvs log: Logging .
> > >cvs log: Logging config
> > >cvs log: Logging dist
> > >cvs log: in directory dist:
> > >cvs [log aborted]: there is no version here; do 'cvs checkout' first
> > >17:26:30:171 [Thread - AnthillBuildDaemon] ERROR
> > >com.urbancode.anthill.BuildManager - cvs log f
> > >ailed. Exit code: 1
> > >com.urbancode.anthill.adapter.RepositoryException: cvs log failed.
Exit
> > code: 1
> > > at
> >
>
com.urbancode.anthill.adapter.CVSRepositoryAdapter.getRevisionsSince(CVSRepo
> > sitoryAda
> > >pter.java:232)
> > > at
> > com.urbancode.anthill.BuildManager.loadRevisions(BuildManager.java:287)
> > > at
> com.urbancode.anthill.BuildManager.build(BuildManager.java:215)
> > > at
> >
>
com.urbancode.anthill.AnthillProject.releaseProject(AnthillProject.java:231)
> > > at
> >
>
com.urbancode.anthill.AnthillProject.releaseProject(AnthillProject.java:217)
> > > at
> >
>
com.urbancode.anthill.AnthillProject.releaseProject(AnthillProject.java:195)
> > > at
> > com.urbancode.anthill.AnthillProject.run(AnthillProject.java:187)
> > > at com.urbancode.anthill.BuildDaemon.run(BuildDaemon.java:73)
> > >
> > >I believe this relates to the fact that some files don't have
> > >revisions under the work directory since they are not within cvs, they
> > >are produced as part of the build, this means that when cvs tries to
> > >get a revision for the file it fails.
> > >
> > >I'm using version 1.8.0.264 of anthill, we upgraded frmo version 1.5.x
> > >something where we didn't get the problem originally. This is causing
> > >some issues at the mo, would be grateful is somebody could recommend a
> > >fix or workaround.
> > >
> > >Many thanks,
> > >
> > >
> > No the problem is that you have a directory that is supposed to be under
> > CVS control but the CVS control files are missing from it. I've had this
> > problem when the build script "cleans" a directory of everything
> > including the CVS directory.
> >
> > --
> > Erik Husby
> > Senior Software Engineer
> > Broad Institute of MIT and Harvard
> > Rm. 2192 320 Charles St, Cambridge, MA 02141-2023
> > mobile: 781.354.6669, office: 617.258.9227,
> > email: mhusby at broad.mit.edu AIM: ErikAtBroad
> >
> > _______________________________________________
> > Anthill mailing list
> > Anthill at lists.urbancode.com
> > http://lists.urbancode.com/mailman/listinfo/anthill
> >
>
More information about the Anthill
mailing list