Re: compile from ant

From: Mike Schrag (mschra..dimension.com)
Date: Wed Oct 05 2005 - 11:28:50 EDT

  • Next message: Bill Michell: "RE: compile from ant"

    I was thinking that as well ... Yours seems more correct, is it ok if
    I "adopt" it?

    ms

    On Oct 5, 2005, at 11:12 AM, Bill Michell wrote:

    > I do much the same but using wocompile:
    >
    > <target name="compile.woframework" if="srcAvailable">
    >
    > <taskdef name="wocompile"
    > classname="org.objectstyle.woproject.ant.WOCompile"/>
    >
    > <wocompile srcdir="${src.dir}" destdir="${classes.dir}"
    > debug="on"
    > optimize="off"
    > deprecation="on"
    > source="1.4" >
    > <!-- System frameworks -->
    > <frameworks dir="${wo.wosystemroot}">
    > <patternset>
    > <includesfile name="woproject/
    > ant.frameworks.wo.wosystemroot"/>
    > </patternset>
    > </frameworks>
    > <!-- Local frameworks -->
    > <frameworks dir="${wo.wolocalroot}">
    > <patternset>
    > <includesfile name="woproject/
    > ant.frameworks.wo.wolocalroot"/>
    > </patternset>
    > </frameworks>
    > <!-- User frameworks -->
    > <frameworks dir="${user.home}">
    > <patternset>
    > <includesfile name="woproject/
    > ant.frameworks.user.home"/>
    > </patternset>
    > </frameworks>
    > <!-- System classpaths -->
    > <classpath>
    > <fileset dir="${wo.wosystemroot}">
    > <patternset>
    > <includesfile name="woproject/
    > ant.classpaths.wo.wosystemroot"/>
    > </patternset>
    > </fileset>
    > </classpath>
    > <!-- Extra jar files added in this project -->
    > <classpath>
    > <fileset dir="${jar.dir}">
    > <patternset>
    > <includesfile name="woproject/
    > jars.include.patternset"/>
    > </patternset>
    > </fileset>
    > </classpath>
    > </wocompile>
    > </target>
    >
    > Obviously, I have a suitable main target that sets up the various
    > properties as I need them. There is an equivalent version for
    > WOApplications.
    >
    > Any chance something like this can be added to the default
    > build.xml files?
    >
    > --
    > Bill Michell
    > Development Team Leader, Broadcast Platforms, BBC News Interactive.
    >
    >
    >
    >
    > -----Original Message-----
    > From: Mike Schrag [mailto:mschra..dimension.com]
    > Sent: Wednesday, October 05, 2005 4:04 PM
    > To: woproject-de..bjectstyle.org
    > Subject: compile from ant
    >
    > I normally build out of Eclipse, but for one of my projects I setup a
    > nightly build and realized I needed to add a compile target to the
    > wolips build.xml. I'm not sure if this is the most efficient way,
    > but it worked for me:
    >
    > <target name = "compileAndBuild" depends =
    > "setProps,init.build,compile,build.woapp,ssdd,war" />
    >
    > <target name = "compile" depends = "setProps,init.build" >
    > <mkdir dir = "bin"/>
    > <javac srcdir = "src" destdir = "bin">
    > <classpath>
    > <fileset dir="$
    > {wo.dir.user.home.library.frameworks}" includesfile = "woproject/
    > ant.frameworks.user.home">
    > <include name = "**/*.jar"/>
    > </fileset>
    > <fileset dir="${wo.wolocalroot}"
    > includesfile = "woproject/ant.frameworks.wo.wolocalroot">
    > <include name = "**/*.jar"/>
    > </fileset>
    > <fileset dir="${wo.wosystemroot}"
    > includesfile = "woproject/ant.frameworks.wo.wosystemroot">
    > <include name = "**/*.jar"/>
    > </fileset>
    > <fileset dir = "lib">
    > <include name="**/*.jar"/>
    > </fileset>
    > </classpath>
    > </javac>
    > </target>
    >
    > and then I run ant:
    >
    > ant -lib /Path/To/Folder/Containing/woproject.jar/ -f /Path/To/
    > build.xml compileAndBuild
    >
    > ms
    >
    >
    >
    > http://www.bbc.co.uk/
    >
    > This e-mail (and any attachments) is confidential and may contain
    > personal views which are not the views of the BBC unless specifically
    > stated.
    > If you have received it in error, please delete it from your system.
    > Do not use, copy or disclose the information in any way nor act in
    > reliance on it and notify the sender immediately. Please note that the
    > BBC monitors e-mails sent or received.
    > Further communication will signify your consent to this.
    >



    This archive was generated by hypermail 2.0.0 : Wed Oct 05 2005 - 11:28:59 EDT