[OWASP-ESAPI] Ant buildfile

Kevin Fealey kfealz at gmail.com
Fri Oct 24 14:36:17 EDT 2008


Andrea,
Thanks a lot for your input.  Per your suggestion, 2 new build files have
been added to Swingset's root.

   - build-dist.xml is pretty much your attached build file.  It creates a
   WAR file and copies it to a location of your choice (I only changed the
   deploydir to "C:\ESAPI_Swingset\build" )
   - build.xml builds Swingset and runs build-dist's deploy target which
   creates the WAR file

For now, these additions are included only on the SVN.  There will probably
be a new release of Swingset sometime next week, and the build files will be
included in the source zip files.

I am having one problem with your build file.  Eclipse complains that
"build", the dependency of the "dist" target does not exist because it is
not in build-dist.xml.  "build" is in build.xml, so I would like to either
make Eclipse aware that I know where "build" is, or ignore the warning
altogether.  Does anyone know how to do this?

Thanks,
Kevin

On Thu, Oct 23, 2008 at 2:21 PM, Andrea Cogliati <andreac at dollos.it> wrote:

> Kevin,
>
> it would be great to provide an Ant buildfile for those not
> working/familiar with Eclipse. You can easily do that in Eclipse if you
> export the project to Ant Buildfile. To further simplify building and
> deploying a WAR file I've created this simple custom buildfile. If you put
> it the root folder of the Eclipse project before exporting it to Ant, the
> generated buildfile will automatically import it so you can have 3 more
> targets: dist, deploy and dist.clean.
>
> Andrea
>
>
> build-dist.xml:
>
> <?eclipse.ant.import?>
>
> <project name="dist">
>        <property name="warfile" value="${ant.project.name}"/>
>        <property name="deploydir"
> value="/Users/andreac/work/rss/Swingset__with_tomcat_03b/apache-tomcat-6.0.18/webapps"/>
>        <property name="deployfile" value="ROOT.war"/>
>
>        <target depends="build" name="dist">
>                <war destfile="build/${warfile}.war"
> webxml="WebContent/WEB-INF/web.xml" update="true">
>                        <classes dir="build\classes"/>
>                        <fileset dir="WebContent">
>                                <exclude name="WEB-INF/web.xml"/>
>                        </fileset>
>                </war>
>        </target>
>
>        <target depends="clean" name="clean">
>        <delete file="build/${warfile}.war"/>
>    </target>
>
>    <target depends="dist" name="deploy">
>        <copy file="build/${warfile}.war"
> tofile="${deploydir}/${deployfile}" overwrite="true"/>
>    </target>
> </project>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/owasp-esapi/attachments/20081024/da0c2215/attachment.html 


More information about the OWASP-ESAPI mailing list