[Join-cvs] join1 build.xml,NONE,1.1
Brought to you by:
lbroudoux
|
From: Laurent B. <lbr...@us...> - 2009-01-20 22:47:49
|
Update of /cvsroot/join/join1 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1074/join1 Added Files: build.xml Log Message: Add Ant build file --- NEW FILE: build.xml --- <?xml version="1.0" encoding="UTF-8"?> <!-- =========================================================================== Build file for Join project - for use with the Jakarta Ant build tool Setup instructions: Before running an Ant build, you must - set the JAVA_HOME environment variable to the JDK root directory - To build javadocs: use JDK 1.4.x or higher Build Instructions: To build, run build.bat (win32) or build.sh (unix) in the directory where this file is located. The batch/shell file sets up your classpath and calls java org.apache.tools.ant.Main Build targets This build file supports the following targets: - full : generate configuration files, compile and package - distrib : compile and package If you build a target that depends on other targets, those other targets are created in the correct order. Author: Laurent Broudoux $Revision: 1.1 $ ============================================================================ --> <project name="join" basedir="." default="full"> <!-- ==================================================================== --> <!-- General properties definition --> <!-- ==================================================================== --> <property name="Name" value="Join" /> <property name="version" value="1.0" /> <property name="year" value="2005" /> <!-- ==================================================================== --> <!-- Path properties definition --> <!-- ==================================================================== --> <property name="lib.dir" value="${basedir}/lib" /> <property name="tools.dir" value="${basedir}/tools" /> <property name="src.dir" value="${basedir}/src/main" /> <property name="src.web.dir" value="${basedir}/src/web" /> <property name="src.res.dir" value="${basedir}/src/resources" /> <property name="test.dir" value="${basedir}/src/test" /> <property name="build.dir" value="${basedir}/build" /> <property name="build.web.dir" value="${basedir}/build/WEB-INF" /> <property name="build.lib.dir" value="${basedir}/build/WEB-INF/lib" /> <property name="build.classes.dir" value="${basedir}/build/WEB-INF/classes" /> <!-- ==================================================================== --> <!-- Declaration of different classpaths --> <!-- ==================================================================== --> <path id="tools.class.path"> <fileset dir="${lib.dir}" includes="*.jar"/> <fileset dir="${tools.dir}" includes="*.jar"/> </path> <path id="compile.class.path"> <fileset dir="${lib.dir}" includes="*.jar"/> <fileset dir="${tools.dir}" includes="jsp-api.jar,servlet-api.jar,ant-*.jar"/> </path> <path id="test.class.path"> <fileset dir="${lib.dir}/test" includes="*.jar"/> <path refid="compile.class.path"/> </path> <!-- ==================================================================== --> <!-- Declaration of Taskdef --> <!-- ==================================================================== --> <target name="init"> <echo>Init ${Name}</echo> <taskdef name="hbndoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask" classpathref="tools.class.path"/> <taskdef name="webdoclet" classname="xdoclet.modules.web.WebDocletTask" classpathref="tools.class.path"/> <mkdir dir="${build.dir}" /> <mkdir dir="${build.web.dir}" /> <mkdir dir="${build.lib.dir}" /> <mkdir dir="${build.classes.dir}" /> </target> <target name="clean"> <delete failonerror="false"> <fileset dir="${build.dir}" includes="**/*.*" excludes="/META-INF/context.xml"/> </delete> </target> <!-- ==================================================================== --> <!-- Generate Hibernate descriptors --> <!-- ==================================================================== --> <target name="hbndoclet" depends="init"> <hbndoclet destdir="${build.classes.dir}" verbose="true"> <fileset dir="${src.dir}" includes="**/core/messaging/*Info.java" /> <fileset dir="${src.dir}" includes="**/services/*/*Info.java" /> <fileset dir="${src.dir}" includes="**/businessobjects/**/*.java" /> <hibernate version="2.0" templateFile="${src.res.dir}/xdoclet/hibernate.xdt"/> </hbndoclet> </target> <!-- ==================================================================== --> <!-- Generate WEB and deployment descriptors --> <!-- ==================================================================== --> <target name="webdoclet" depends="init"> <webdoclet destdir="${build.web.dir}"> <fileset dir="${src.dir}" includes="**/control/**/*.java" /> <strutsconfigxml version="1.2" destdir="${build.web.dir}" mergeDir="${src.res.dir}/struts" /> </webdoclet> </target> <!-- ==================================================================== --> <!-- Compile the sources tree --> <!-- ==================================================================== --> <target name="compile" depends="init"> <javac destdir="${build.classes.dir}" debug="on" debuglevel="lines" deprecation="${deprecation}"> <src path="${src.dir}"/> <classpath refid="compile.class.path"/> </javac> </target> <!-- ==================================================================== --> <!-- Create the web context --> <!-- ==================================================================== --> <target name="distrib" depends="init"> <!-- Copy pages and resources --> <copy todir="${build.dir}"> <fileset dir="${src.web.dir}" excludes="**/.*"/> </copy> <!-- Copy all tlds, libs and classes --> <copy todir="${build.web.dir}"> <fileset dir="${lib.dir}/tlds" includes="*.tld"/> <fileset dir="${src.res.dir}/WEB-INF" includes="*.tld"/> <fileset dir="${src.res.dir}/WEB-INF" includes="*.xml"/> </copy> <copy todir="${build.lib.dir}"> <fileset dir="${lib.dir}" includes="*.jar"/> <fileset dir="${tools.dir}" includes="ant-1.6.5.jar,ant-launcher-1.6.5.jar"/> </copy> <copy todir="${build.classes.dir}"> <fileset dir="${src.dir}" includes="**/*.properties"/> <fileset dir="${src.res.dir}/spring" includes="*.xml"/> <fileset dir="${src.res.dir}/properties" includes="*.properties,*.xml"/> </copy> </target> <!-- ==================================================================== --> <!-- Compile & run the JUnit tests --> <!-- ==================================================================== --> <target name="test" depends="compile"> <javac destdir="${build.classes.dir}" debug="on" debuglevel="lines" deprecation="${deprecation}"> <src path="${test.dir}"/> <classpath> <path refid="test.class.path"/> <pathelement location="${build.classes.dir}"/> </classpath> </javac> <!-- Copy tests resources --> <copy todir="${build.classes.dir}"> <fileset dir="${test.dir}" includes="**/*.xml,**/*.groovy,**/*.js"/> </copy> <!-- Run JUnit tests --> <junit fork="${fork}" printsummary="yes"> <jvmarg value="-Dlog4j.configuration=${lib.dir}/test/log4j.properties"/> <classpath> <pathelement location="${build.web.dir}/coverage"/> <pathelement location="${build.classes.dir}"/> <path refid="test.class.path"/> </classpath> <formatter type="xml"/> <batchtest todir="${build.dir}"> <fileset dir="${test.dir}"> <include name="**/*Test.java"/> </fileset> </batchtest> </junit> </target> <!-- ==================================================================== --> <!-- Create the release packages --> <!-- ==================================================================== --> <target name="release"> <!-- Produce archives --> <zip destfile="${basedir}/join-${release.version}.zip"> <zipfileset dir="${build.dir}" prefix="join-${release.version}" excludes="installer/**"/> </zip> <tar tarfile="${basedir}/join-${release.version}.tar"> <tarfileset dir="${build.dir}" prefix="join-${release.version}" excludes="installer/**"/> </tar> <gzip zipfile="${basedir}/join-${release.version}.tar.gz" src="${basedir}/join-${release.version}.tar"/> <!-- Produce windows installer --> <mkdir dir="${build.dir}/installer"/> <copy todir="${build.dir}/installer"> <fileset dir="${basedir}" includes="LICENSE.txt"/> <fileset dir="${src.res.dir}/installer" includes="*.nsi"/> <filterset> <filter token="join.version" value="${release.version}"/> </filterset> </copy> <copy todir="${build.dir}/installer/tomcat" includeEmptyDirs="false"> <fileset dir="${tomcat.home}" excludes="conf/Catalina/localhost/*.xml,webapps/**"/> </copy> <!-- <copy todir="${build.dir}/installer/tomcat/conf" file="${src.res.dir}/installer/server.xml" overwrite="true"/> --> <copy tofile="${build.dir}/installer/tomcat/conf/server.xml" file="${src.res.dir}/installer/server-5.5.xml" overwrite="true"/> <copy todir="${build.dir}/installer/join"> <fileset dir="${build.dir}" excludes="installer/**"/> </copy> <mkdir dir="${build.dir}/installer/home"/> <touch file="${build.dir}/installer/home/join-${release.version}"/> <!-- Produce archives --> <zip destfile="${basedir}/join-standalone-${release.version}.zip"> <zipfileset dir="${build.dir}/installer" prefix="join-${release.version}" excludes="installer/**"/> </zip> <tar tarfile="${basedir}/join-standalone-${release.version}.tar"> <tarfileset dir="${build.dir}/installer" prefix="join-${release.version}" excludes="installer/**"/> </tar> <gzip zipfile="${basedir}/join-standalone-${release.version}.tar.gz" src="${basedir}/join-standalone-${release.version}.tar"/> </target> <!-- ==================================================================== --> <!-- Tag all Java sources with Copyright notice --> <!-- ==================================================================== --> <target name="tag"> <mkdir dir="${basedir}/tag" /> <copy todir="${basedir}/tag" overwrite="true"> <fileset dir="${basedir}" includes="**/*.java,**/*.xml,**/*.jsp,**/*.groovy,**/*.properties"> <exclude name="build/**"/> <exclude name="lib/**"/> <exclude name="tag/**"/> <exclude name="tools/**"/> </fileset> <!-- <filterchain> <headfilter lines="-1" skip="5" /> <concatfilter prepend="${basedir}/COPYRIGHT.txt" /> </filterchain> --> </copy> <fixcrlf srcdir="${basedir}/tag" eol="unix" /> </target> <!-- ==================================================================== --> <!-- Convenient default target --> <!-- ==================================================================== --> <target name="full" depends="clean,hbndoclet,webdoclet,compile,distrib"> <echo>${Name} has been built successfully. Have a nice day !</echo> </target> </project> |