Re: Incremental vs. Ant build

From: Geoff Hopson (ghopso..ac.com)
Date: Fri Jul 30 2004 - 02:27:22 EDT

  • Next message: David Teran: "cannot build current version"

    I do the latter - run in incremental whilst developing, and when ready
    to deploy, I drop out to terminal and run a little script that cd's
    into each framework and app folder in the workspace and does an 'ant
    install' in each. This copies a proper framework to
    /Library/Frameworks, the apps go to /Library/WebObjects/Applications. I
    then tar them all up, and suck the tarball over from the deployment
    machine into a 'Releases' directory, where I unpack. I have softlinks
    on my deployment server from /Library/Frameworks and
    .Library/WebObjects/Applications to the applications/frameworks in my
    Releases directory, and everything just works. (It's a bit more complex
    actually - I have different versions in Releases and unpack the tarball
    into a new release subfolder, as opposed to overwriting old, working
    deployments. Then I have a softlink called 'current' that I switch when
    I am ready to do so - the softlinks in /Library/Frameworks point to
    'current' - seen that before anywhere? :-)

    It's all very hardcoded, but the following gives you the idea, and I'm
    sure others could contribute better ways (eg do the script in Ant!) to
    do this. This took all of 2 minutes to put together and get working
    (make sure you have woproject.jar and cayenne.jar in $ANT_HOME/lib)

    #!/bin/sh
    #
    # Build deployments
    cd ~/Work/workspace;
    # frameworks
    ant -f ObjectologyBase/build.xml install;
    ant -f ObjectologyContent/build.xml install;
    ant -f ObjectologyInterview/build.xml install;
    ant -f ObjectologyMessage/build.xml install;
    # applications
    ant -f TaxQ/build.xml install;
    ant -f TaxQAdmin/build.xml install;

    # tar it all up...
    tar cfz /tmp/deployment_`date +"%Y%m%d"`.tgz \
             /Library/Frameworks/ObjectologyBase.framework \
             /Library/Frameworks/ObjectologyContent.framework \
             /Library/Frameworks/ObjectologyInterview.framework \
             /Library/Frameworks/ObjectologyMessage.framework \
             /Library/Frameworks/PostgresqlPlugin.framework \
             /Library/Java/Extensions/postgresql.jar \
             /Library/WebObjects/Applications/TaxQ.woa \
             /Library/WebObjects/Applications/TaxQAdmin.woa

    # tidy up after you...
    rm -rf /Library/Frameworks/ObjectologyBase.framework
    rm -rf /Library/Frameworks/ObjectologyContent.framework
    rm -rf /Library/Frameworks/ObjectologyInterview.framework
    rm -rf /Library/Frameworks/ObjectologyMessage.framework
    rm -rf /Library/WebObjects/Applications/TaxQ.woa
    rm -rf /Library/WebObjects/Applications/TaxQAdmin.woa

    YMMV,
    Geoff

    On 30 Jul 2004, at 05:00, Brendan Duddridge wrote:

    >>
    >>> 3. Do you have to switch every project to the Ant build before doing
    >>> a
    >>> deployment?
    >>>
    >>>
    >> Not sure what you mean.
    >>
    >>
    >> Chuck
    >>
    >
    > Hi Chuck,
    >
    > What I mean is, what's the procedure for doing an install build right
    > before
    > deploying an app and frameworks? In Xcode, I usually only built with
    > the
    > Development build-style and then copied my .framework and .woa to my
    > production servers. That worked fine for deployment for me.
    >
    > In Eclipse/WOLips, if my projects are configured with the Incremental
    > build
    > and I explicitly run the Ant install target for my frameworks and
    > apps, the
    > MacOSClassPath.txt file doesn't have all my framework references in it
    > (I
    > understand this is already a known bug that may already be fixed in
    > CVS), so
    > my app won't run properly.
    >
    > So I guess what I'm asking is what's the normal way for people to
    > develop
    > and deploy their apps with Eclipse/WOLips?
    >
    > Do you develop and run mostly with the Incremental build setting and
    > then
    > switch to the Ant (build.xml) setting right before deploying?
    >
    > Or do you develop and run mostly with the Incremental build setting
    > and then
    > explicitely run each of the Ant install targets for each framework and
    > application right before deploying?
    >
    > Thanks,
    >
    > ___________________________
    >
    > Brendan Duddridge
    >
    > ClickSpace Interactive Inc.
    > Suite L100
    > 239 - 10th Ave SE
    > Calgary, AB T2G 0V9
    > Canada
    > (403) 277-5591
    > http://www.clickspace.com/
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Jul 30 2004 - 02:27:32 EDT