Re: Building project from the command line

From: Ulrich Köster (ulric..bjectstyle.org)
Date: Tue Apr 13 2004 - 13:23:25 EDT

  • Next message: Charles-Edouard Ruault: "Re: Building project from the command line"

    Hi Charles,

    Am 09.04.2004 um 09:59 schrieb Charles-Edouard Ruault:

    > Hi all,
    >
    > i'm using eclipse/Wolips to develop WebObject apps and frameworks ,
    > everything is ok ( aside a few glitches here and there ... ).

    Please report them:
    http://objectstyle.org/jira/

    > Now i would like to build scripts to automate the build of our
    > application ( consisting of a few Frameworks and Apps ).
    > In order to minimize the work i would like to reuse the build.xml
    > scripts produced by WOLips. Unfortunately they don't include the
    > taskdefs and wocompile blocks needed to build from the command line.

    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=WOL-40

    >
    > For example, to be able to build one Framework from the command line i
    > had to add :
    > <taskdef name="woframework"
    > classname="org.objectstyle.woproject.ant.WOFramework"></taskdef>
    > <taskdef name="wocompile"
    > classname="org.objectstyle.woproject.ant.WOCompile"></taskdef>
    > and then within the <target name="build.woframework"> tag :
    > <wocompile srcdir="." destdir="${classes.dir}">
    > <frameworks root="${wo.root}/Library/Frameworks">
    > <include name="JavaWebObjects.framework"/>
    > <include name="JavaFoundation.framework"/>
    > <include name="JavaXML.framework"/>
    > <include name="JavaWOExtensions.framework"/>
    > <include name="JavaEOAccess.framework"/>
    > <include name="JavaEOControl.framework"/>
    > </frameworks>
    > <frameworks root="${wo.localroot}/Library/Frameworks">
    > </frameworks>
    > <classpath>
    > <fileset dir="${wo.localroot}">
    > <include
    > name="/Library/WebObjects/Extensions/log4j-1.2.4.jar" />
    > </fileset>
    > </classpath>
    > </wocompile>

    WOLips creates some patternset files for an application. With this
    files it's very easy to compile from the command line. WOLips
    automatically updates these files on classpath modification. We could
    enable this feature also for frameworks.

    <taskdef name="wocompile"
    classname="org.objectstyle.woproject.ant.WOCompile"></taskdef>
                    <wocompile srcdir="src" destdir="foo">
                            <frameworks root="${wo.wosystemroot}">
                                           <patternset>
                                               <includesfile name="ant.frameworks.wo.wosystemroot"/>
                                    </patternset>
                                </frameworks>
                                <frameworks root="${wo.wolocalroot}">
                                           <patternset>
                                               <includesfile name="ant.frameworks.wo.wolocalroot"/>
                                    </patternset>
                                </frameworks>
                            <frameworks root="${user.home}">
                                           <patternset>
                                               <includesfile name="ant.frameworks.user.home"/>
                                    </patternset>
                                </frameworks>
                            <classpath>
                                   <fileset dir=".">
                                       <include name="lib/log4j-1.2.4.jar" />
                                   </fileset>
                       </classpath>
                    </wocompile>

    >
    > All the Frameworks and classpath components defined here are extracted
    > from the .classpath file . This makes it quite a heavy process :(
    > On top of it, it breaks compilation from within Eclipse. Wich forces
    > to have to build files per project ( maintenance nightmare ).
    > I was wondering what would be a clean way to make it work
    > automatically.
    > Is there a way to generate a "command line compatible" build file from
    > within eclipse/WOLips ? It this feature planned ?
    > Otherwise i was thinking of building a shell script to extract all the
    > missing params from the .classpath and automatically build a command
    > line compatible build.xml file from the WOLips version ....
    > Any other suggestion is welcome !
    > Let me know what you think !

    We should enable the generation of the ant.* files for frameworks plus
    some additions to the build.xml.

    Ulrich



    This archive was generated by hypermail 2.0.0 : Tue Apr 13 2004 - 13:23:07 EDT