[Batchserver-cvs] batchserver build.xml,1.5,1.6
Brought to you by:
suresh_pragada
From: Suresh <sur...@us...> - 2006-09-20 12:56:26
|
Update of /cvsroot/batchserver/batchserver In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21674 Modified Files: build.xml Log Message: no message Index: build.xml =================================================================== RCS file: /cvsroot/batchserver/batchserver/build.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** build.xml 15 Sep 2006 20:29:38 -0000 1.5 --- build.xml 20 Sep 2006 12:56:23 -0000 1.6 *************** *** 1,230 **** ! <project name="batch-framework" default="source-compile" basedir="."> ! ! <!-- ===================== Property Definitions =========================== --> ! ! <property file="build.properties"/> ! ! ! <!-- ==================== File and Directory Names ======================== --> ! ! <property name="build.home" value="${basedir}/build"/> ! <property name="dist.home" value="${basedir}/dist"/> ! <property name="docs.home" value="${basedir}/docs"/> ! <property name="src.home" value="${basedir}/src"/> ! <property name="lib.home" value="${basedir}/lib"/> ! <property name="test.home" value="${basedir}/test"/> ! <property name="reports.home" value="${basedir}/reports"/> ! ! ! <!-- ==================== Compilation Control Options ==================== --> ! ! <property name="compile.debug" value="true"/> ! <property name="compile.deprecation" value="false"/> ! <property name="compile.optimize" value="true"/> ! ! ! <!-- ======= Pattern Sets, File Sets, Application Classpaths ======= --> ! ! <patternset id="app.resources"> ! <include name="**/*.properties"/> ! <include name="**/*.xml"/> ! </patternset> ! ! <path id="compile.classpath"> ! <!-- Include all JAR files that will be required to compile application --> ! <pathelement location="${lib.home}/xml/xml_apis.jar"/> ! <pathelement location="${lib.home}/xml/apache/resolver_2.7.1.jar"/> ! <pathelement location="${lib.home}/xml/apache/xerces_impl_2.7.1.jar"/> ! </path> ! <property name="compile.classpath" refid="compile.classpath"/> ! ! ! <path id="runtime.classpath"> ! <path location="${build.home}/src"/> ! <path refid="compile.classpath"/> ! </path> ! <property name="runtime.classpath" refid="runtime.classpath"/> ! ! <path id="test.compile.classpath"> ! <path refid="runtime.classpath"/> ! <path location="${lib.home}/junit/junit_1.0.jar"/> ! </path> ! <property name="test.compile.classpath" refid="test.compile.classpath"/> ! ! <path id="test.runtime.classpath"> ! <path refid="test.compile.classpath"/> ! <pathelement location="${build.home}/test"/> ! </path> ! <property name="test.runtime.classpath" refid="test.runtime.classpath"/> ! ! <!-- ==================== Source-Clean-Compile Target ====================================== --> ! ! <target name="source-clean-compile" depends="source-clean,source-compile" description="Clean and compile the source"/> ! ! <!-- ==================== Source-Clean Target ==================================== --> ! ! <target name="source-clean" description="Delete old source build directories"> ! <delete dir="${build.home}/src"/> ! </target> ! ! ! <!-- ==================== Source-Compile Target ================================== --> ! ! <target name="source-compile" description="Compile Java sources"> ! ! <!-- Compile Java classes as necessary --> ! <mkdir dir="${build.home}/src"/> ! <echo message="Classpath for compilation : ${compile.classpath}"/> ! <javac srcdir="${src.home}" ! destdir="${build.home}/src" ! debug="${compile.debug}" ! deprecation="${compile.deprecation}" ! optimize="${compile.optimize}"> ! <classpath refid="compile.classpath"/> ! </javac> ! ! <!-- Copy application resources --> ! <copy todir="${build.home}/src"> ! <fileset dir="${src.home}"> ! <patternset refid="app.resources"/> ! </fileset> ! </copy> ! ! </target> ! ! <!-- ======================== Run Target ================================================ --> ! ! <target name="run" depends="source-compile" description="Runs the given class file"> ! <echo message="Running the class using the classpath : ${runtime.classpath}"/> ! <java classname="org.jmonks.batchserver.framework.common.Main" fork="true"> ! <classpath refid="runtime.classpath"/> ! <arg value="batchJobName=SomeJob"/> ! </java> ! </target> ! ! <!-- ==================== Test-Clean-Compile Target ====================================== --> ! ! <target name="test-clean-compile" depends="test-clean,test-compile" description="Clean and compile the test classes"/> ! ! <!-- ==================== Test-Clean Target ==================================== --> ! ! <target name="test-clean" description="Delete old test build directories"> ! <delete dir="${build.home}/test"/> ! </target> ! ! ! <!-- ==================== Test-Compile Target ================================== --> ! ! <target name="test-compile" depends="source-compile" description="Compile Test Java sources"> ! ! <!-- Compile Test Java classes as necessary --> ! <mkdir dir="${build.home}/test"/> ! <echo message="Classpath for test compilation : ${test.compile.classpath}"/> ! ! <javac srcdir="${test.home}" ! destdir="${build.home}/test" ! debug="${compile.debug}" ! deprecation="${compile.deprecation}" ! optimize="${compile.optimize}"> ! <classpath refid="test.compile.classpath"/> ! </javac> ! ! <!-- Copy application resources --> ! <copy todir="${build.home}/test"> ! <fileset dir="${test.home}"> ! <patternset refid="app.resources"/> ! </fileset> ! </copy> ! ! </target> ! ! <!-- ==================== Run Framework Test Suite Target ===================================== --> ! <target name="run-framework-test-suite" depends="test-compile" description="Run Framework Test Suite"> ! <!-- Make sure you have junit jar and junit ant jar in ant lib directory --> ! <echo message="Running Framework Test Suite"/> ! <echo message="Classpath to run test suite : ${test.runtime.classpath}"/> ! <delete dir="${reports.home}"/> ! <mkdir dir="${reports.home}"/> ! <junit printsummary="true"> ! <classpath refid="test.runtime.classpath"/> ! <!-- To generate the test reports use the below xml formatter instead of plain formmater --> ! <formatter type="xml" usefile="true"/> ! <!-- <formatter type="plain" usefile="false"/> --> ! <test name="org.jmonks.batchserver.framework.FrameworkTestSuite" todir="${reports.home}"/> ! </junit> ! </target> ! <!-- ==================== Run All Tests Target ===================================== --> ! <target name="run-all-tests" depends="test-compile" description="Run all the tests available in project"> ! <!-- Make sure you have junit jar and junit ant jar in ant lib directory --> ! <echo message="Running All JUnit Tests"/> ! <echo message="Classpath for run all tests : ${test.runtime.classpath}"/> ! <delete dir="${reports.home}"/> ! <mkdir dir="${reports.home}"/> ! ! <junit printsummary="true"> ! <classpath refid="test.runtime.classpath"/> ! <!-- To run all the JUnit Test classes --> ! <formatter type="xml" usefile="true"/> ! <batchtest todir="${reports.home}"> ! <fileset dir="${build.home}/test" includes="**/*Test.class"/> ! </batchtest> ! </junit> ! </target> ! <!-- ==================== JUnit Reports Format Target ===================================== --> ! <target name="run-format-framework-test-suite" depends="run-framework-test-suite" description="Run the unittests and format the test results into html docs"> ! <!-- Make sure you have junit jar and junit ant jar in ant lib directory --> ! <junitreport todir="${reports.home}"> ! <fileset dir="${reports.home}"> ! <include name="*.xml"/> ! </fileset> ! <report format="frames" todir="${reports.home}/html"/> ! </junitreport> ! </target> - <target name="run-format-all-tests-results" depends="run-all-tests" description="Run the unittests and format the test results into html docs"> - <!-- Make sure you have junit jar and junit ant jar in ant lib directory --> - <junitreport todir="${reports.home}"> - <fileset dir="${reports.home}"> - <include name="*.xml"/> - </fileset> - <report format="frames" todir="${reports.home}/html"/> - </junitreport> - </target> ! <!-- ==================== Dist Target ===================================== --> ! <target name="dist" depends="source-clean-compile,javadoc" description="Create binary distribution"> ! <!-- Copy documentation subdirectories --> ! <mkdir dir="${dist.home}/docs"/> ! <copy todir="${dist.home}/docs"> ! <fileset dir="${docs.home}"/> ! </copy> ! <!-- Create application JAR file --> ! <jar jarfile="${dist.home}/${app.name}-${app.version}.jar" ! basedir="${build.home}/src"/> ! </target> ! <!-- ==================== Javadoc Target ================================== --> ! <target name="javadoc" depends="source-clean-compile" description="Create Javadoc API documentation"> ! <delete dir="${docs.home}"/> ! <mkdir dir="${docs.home}"/> ! <javadoc sourcepath="${src.home}" ! destdir="${docs.home}" ! packagenames="*" ! author="true" ! version="true" ! use="true"> ! <classpath refid="compile.classpath"/> ! </javadoc> ! </target> </project> - --- 1,69 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! <!-- You may freely edit this file. See commented blocks below for --> ! <!-- some examples of how to customize the build. --> ! <!-- (If you delete it and reopen the project it will be recreated.) --> ! <project name="batchserver" default="default" basedir="."> ! <description>Builds, tests, and runs the project batchserver.</description> ! <import file="nbproject/build-impl.xml"/> ! <!-- ! There exist several targets which are by default empty and which can be ! used for execution of your tasks. These targets are usually executed ! before and after some main targets. They are: ! -pre-init: called before initialization of project properties ! -post-init: called after initialization of project properties ! -pre-compile: called before javac compilation ! -post-compile: called after javac compilation ! -pre-compile-single: called before javac compilation of single file ! -post-compile-single: called after javac compilation of single file ! -pre-compile-test: called before javac compilation of JUnit tests ! -post-compile-test: called after javac compilation of JUnit tests ! -pre-compile-test-single: called before javac compilation of single JUnit test ! -post-compile-test-single: called after javac compilation of single JUunit test ! -pre-jar: called before JAR building ! -post-jar: called after JAR building ! -post-clean: called after cleaning build products ! (Targets beginning with '-' are not intended to be called on their own.) ! Example of inserting an obfuscator after compilation could look like this: ! <target name="-post-compile"> ! <obfuscate> ! <fileset dir="${build.classes.dir}"/> ! </obfuscate> ! </target> ! For list of available properties check the imported ! nbproject/build-impl.xml file. ! Another way to customize the build is by overriding existing main targets. ! The targets of interest are: ! -init-macrodef-javac: defines macro for javac compilation ! -init-macrodef-junit: defines macro for junit execution ! -init-macrodef-debug: defines macro for class debugging ! -init-macrodef-java: defines macro for class execution ! -do-jar-with-manifest: JAR building (if you are using a manifest) ! -do-jar-without-manifest: JAR building (if you are not using a manifest) ! run: execution of project ! -javadoc-build: Javadoc generation ! test-report: JUnit report generation ! An example of overriding the target for project execution could look like this: ! <target name="run" depends="batchserver-impl.jar"> ! <exec dir="bin" executable="launcher.exe"> ! <arg file="${dist.jar}"/> ! </exec> ! </target> ! Notice that the overridden target depends on the jar target and not only on ! the compile target as the regular run target does. Again, for a list of available ! properties which you can use, check the target you are overriding in the ! nbproject/build-impl.xml file. + --> </project> |