Build scripts suggestion

From: Miguel Arroz (arro..uiamac.com)
Date: Sat Nov 01 2008 - 11:37:45 EDT

  • Next message: Miguel Arroz: "Re: Build scripts suggestion"

    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.

       Yours

    Miguel Arroz

    ...........................
    http://www.survs.com





    This archive was generated by hypermail 2.0.0 : Sat Nov 01 2008 - 11:38:37 EDT