Re: Build scripts suggestion

From: Chuck Hill (chil..lobal-village.net)
Date: Sat Nov 01 2008 - 13:34:04 EDT

  • Next message: Lachlan Deck: "Re: How long before nightly becomes stable?"

    On Nov 1, 2008, at 8:37 AM, Miguel Arroz wrote:

    > Hi!
    >
    > Yesterday I spent a significant amount of time trying to debug a
    > build script. The problem was that a lot of stuff was being copied
    > to the Split WSR directory, much more that what it should. After
    > swearing a lot, wishing to be a farmer, all that stuff, I found the
    > problem: the files being copied to the Split directory were actually
    > not being put in the build WSR directory by this build script, but
    > they were leftovers from previous builds (pre-hotness). I haven't
    > noticed them before because that app didn't have any WSR so the
    > folder was not exposed to apache.
    >
    > The problem is that the incremental builder doesn't delete files
    > that shouldn't be there any more, causing leftovers to remain there,
    > creating problems and eventually security issues (you don't want
    > your Properties file in the WSR :P ).
    >
    > So I suggest adding this target to the build files:
    >
    > <!-- Removes build directory to avoid leftovers from previous
    > builds -->
    > <target name="removeBuildDirectory" depends="init.properties">
    > <delete dir="${dest.dir}/${build.app.name}.woa/" />
    > </target>
    >
    > And adding it to the dependencies of the build and install targets,
    > before the build.woapp one.
    >
    > I know this makes the build a little slower, but I'm sure it isn't
    > slower than dealing why crazy stuff is happening during the
    > build. :) Correction first, performance later, I say.

    I do something like this, but in the _clean_ target. That way I can
    decide if I need an ant clean build or just an ant build. Correction
    and performance. :-)

    Chuck

    -- 
    Chuck Hill             Senior Consultant / VP Development
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Sat Nov 01 2008 - 13:35:04 EDT