Re: Build scripts suggestion

From: Miguel Arroz (arro..uiamac.com)
Date: Sat Nov 01 2008 - 12:19:29 EDT

  • Next message: Chuck Hill: "Re: Build scripts suggestion"

    Hi!

       I added another line to remove the contents in the Split directory.
    I noticed that the $wsdest.dir property is being defined inside the
    Split target and not in the init targets. Any reason to not do it?
    This way it wouldn't be needed to copy it to the removeBuildDirectory
    target:

      <!-- Removes build directory to avoid leftovers from previous builds
    -->
      <target name="removeBuildDirectory" depends="init.properties">
         <property name="wsdest.dir" value="${dest.dir}/Split" />
         <delete dir="${dest.dir}/${build.app.name}.woa/" />
         <delete dir="${wsdest.dir}/WebObjects/${build.app.name}.woa" />
       </target>

       Yours

    Miguel Arroz

    On 2008/11/01, at 15:37, 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.
    >
    > Yours
    >
    > Miguel Arroz
    >
    > ...........................
    > http://www.survs.com
    >





    This archive was generated by hypermail 2.0.0 : Sat Nov 01 2008 - 12:20:14 EDT