webwork build.xml,NONE,1.1
[email protected] Fri, 31 Oct 2003 20:37:36 -0800
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork
In directory sc8-pr-cvs1:/tmp/cvs-serv6608
Added Files:
build.xml
Log Message:
New build.xml
--- NEW FILE: build.xml ---
<?xml version="1.0"?>
<project name="WebWork" default="main" basedir=".">
<path id="core.class.path">
<fileset dir="${basedir}/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="init">
<property name="name" value="webwork"/>
<property name="version" value="1.3"/>
<property name="packages" value="webwork.*"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="dist.dir" value="${basedir}/dist"/>
<property file="build.properties"/>
</target>
<target name="precompile" depends="init">
<javacc target="${src.dir}/main/webwork/expr/Parser.jj" javacchome="${lib.dir}/build"/>
</target>
<target name="compile" depends="precompile">
<mkdir dir="${build.dir}/result/web/WEB-INF/classes"/>
<javac srcdir="${src.dir}/main" destdir="${build.dir}/result/web/WEB-INF/classes" debug="on" deprecation="off" optimize="off">
<classpath refid="core.class.path"/>
</javac>
</target>
<target name="webapp" depends="compile">
<!-- JAR files -->
<copy todir="${build.dir}/result/web">
<fileset dir="${src.dir}/resources/web"/>
</copy>
<copy todir="${build.dir}/result/web/WEB-INF/classes">
<fileset dir="${src.dir}/main">
<exclude name="**/*.java"/>
</fileset>
</copy>
<mkdir dir="${build.dir}/result/web/WEB-INF/lib"/>
<jar jarfile="${build.dir}/result/web/WEB-INF/lib/${name}.jar">
<fileset dir="${build.dir}/result/web/WEB-INF/classes">
<exclude name="**/examples/**" />
<exclude name="*.properties"/>
<exclude name="*.xml"/>
<exclude name="**/*.html"/>
</fileset>
</jar>
<jar jarfile="${build.dir}/result/web/WEB-INF/lib/${name}-examples.jar">
<fileset dir="${build.dir}/result/web/WEB-INF/classes">
<include name="**/examples/**"/>
<include name="*.properties"/>
<include name="*.xml"/>
</fileset>
</jar>
<mkdir dir="${build.dir}/lib"/>
<jar jarfile="${build.dir}/lib/${name}client.jar">
<fileset dir="${build.dir}/result/web/WEB-INF/classes">
<include name="webwork/action/client/**"/>
<include name="webwork/action/*.*"/>
<include name="webwork/util/editor/PropertyEditorException.class" />
</fileset>
</jar>
<!-- all this is for the hello world applet example -->
<copy todir="${build.dir}/result/web/examples" file="${build.dir}/lib/${name}client.jar" />
<copy todir="${build.dir}/result/web/examples" file="${lib.dir}/core/commons-logging.jar" />
<copy todir="${build.dir}/result/web/examples/" file="${build.dir}/lib/${name}client.jar" />
<jar jarfile="${build.dir}/result/web/examples/helloworld.jar"
basedir="${build.dir}/result/web/WEB-INF/classes"
includes="**/examples/helloworld/**"/>
<copy todir="${build.dir}/result/web/WEB-INF/lib" includeEmptyDirs="no" flatten="yes">
<fileset dir="${lib.dir}">
<exclude name="build/**" />
</fileset>
</copy>
<copy todir="${build.dir}/lib">
<fileset dir="${build.dir}/result/web/WEB-INF/lib" includes="webwork*.jar"/>
</copy>
</target>
<target name="war" depends="webapp">
<mkdir dir="${build.dir}/deploy" />
<war jarfile="${build.dir}/deploy/${name}.war" webxml="${build.dir}/result/web/WEB-INF/web.xml">
<fileset dir="${build.dir}/result/web">
<exclude name="WEB-INF/classes/webwork/**" />
<exclude name="WEB-INF/web.xml" />
</fileset>
</war>
</target>
<target name="ear" depends="war">
<ear appxml="${src.dir}/resources/ear/META-INF/application.xml" earfile="${build.dir}/deploy/${name}.ear">
<fileset dir="${build.dir}/deploy/">
<include name="*.war" />
</fileset>
</ear>
</target>
<target name="main" depends="webapp">
<mkdir dir="${dist.dir}/lib"/>
<copy todir="${dist.dir}/lib">
<fileset dir="${build.dir}/lib"/>
</copy>
<copy todir="${dist.dir}/lib">
<fileset dir="${build.dir}/result/web/WEB-INF/lib/">
<include name="**/webwork*.jar"/>
</fileset>
</copy>
</target>
<target name="docs" depends="precompile,javadocs">
<copy todir="${build.dir}/result/web/docs/" file="${src.dir}/resources/web/WEB-INF/classes/actions.xml"/>
<copy todir="${build.dir}/result/web/docs/" file="${src.dir}/etc/actions.dtd"/>
<copy todir="${build.dir}/result/web/docs/" file="${src.dir}/main/webwork/default.properties"/>
<copy todir="${build.dir}/result/web/docs/">
<fileset dir="${src.dir}/docs/manual" includes="**/*"/>
</copy>
</target>
<target name="javadocs" depends="init">
<javadoc packagenames="${packages}" sourcepath="${src.dir}/main" destdir="${build.dir}/result/web/docs/api" author="true" version="true" windowtitle="${ant.project.name} API" doctitle="${ant.project.name}" classpathref="core.class.path" bottom="Copyright © 2001-2003 ${ant.project.name} All Rights Reserved.">
<group title="WebWork Action API" packages="webwork.action*"/>
<group title="WebWork Configuration" packages="webwork.config"/>
<group title="WebWork Dispatchers" packages="webwork.dispatcher"/>
<group title="WebWork JSP Taglibs" packages="webwork.view.taglib*"/>
<group title="WebWork Velocity Support" packages="webwork.view.velocity*"/>
<group title="WebWork XSLT Support" packages="webwork.view.xslt*"/>
<group title="WebWork Examples" packages="webwork.examples*"/>
</javadoc>
</target>
<target name="dist" depends="docs,main,ear">
<copy todir="${dist.dir}/etc">
<fileset dir="${src.dir}/etc"/>
</copy>
<copy todir="${dist.dir}/src">
<fileset dir="${src.dir}/main"/>
</copy>
<copy todir="${dist.dir}/examples">
<fileset dir="${src.dir}/resources"/>
</copy>
<copy todir="${dist.dir}/docs">
<fileset dir="${build.dir}/result/web/docs"/>
</copy>
<copy todir="${dist.dir}/lib/supporting-jars" flatten="yes" includeemptydirs="false">
<fileset dir="${lib.dir}" includes="*.jar,**/view/*.jar" excludes="build/**"/>
</copy>
<copy todir="${dist.dir}" file="${basedir}/README.txt"/>
</target>
<target name="dist-zip" depends="dist">
<copy todir="${basedir}/${name}-${version}">
<fileset dir="${dist.dir}"/>
</copy>
<zip zipfile="${dist.dir}/${name}-${version}.zip" basedir="${basedir}" includes="${name}-${version}/**"/>
<delete dir="${basedir}/${name}-${version}"/>
</target>
<target name="dist-bz2" depends="dist">
<copy todir="${basedir}/${name}-${version}">
<fileset dir="${dist.dir}"/>
</copy>
<tar tarfile="${dist.dir}/${name}-${version}.tar.bz2" basedir="${basedir}" includes="${name}-${version}/**" compression="bzip2" />
<delete dir="${basedir}/${name}-${version}"/>
</target>
<target name="clean" depends="init">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete>
<fileset dir="${src.dir}/main/webwork/expr" includes="**/*.java"/>
</delete>
</target>
</project>
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/