[Appsunit-develop] [cvscommit] project version.properties, NONE, 1.1 build.xml, 1.3, 1.4
Status: Beta
Brought to you by:
jancumps
From: Jan C. <jan...@us...> - 2006-09-23 22:12:28
|
Update of /cvsroot/appsunit/project In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv7312 Modified Files: build.xml Added Files: version.properties Log Message: Solved all PMD and checkstyle remarks. Initial JavaDoc documentation. Versioning from property file. --- NEW FILE: version.properties --- # $Id: version.properties,v 1.1 2006/09/23 22:12:23 jancumps Exp $ # $Revision: 1.1 $ # $Date: 2006/09/23 22:12:23 $ # # This property file contains version information. # edit this file for each new release. #global package version #version=X_X for a release #version=X_X_prerelease_${DSTAMP} while developing #version=0_1 version=0_1_prerelease_${DSTAMP} Index: build.xml =================================================================== RCS file: /cvsroot/appsunit/project/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 23 Sep 2006 20:27:04 -0000 1.3 --- build.xml 23 Sep 2006 22:12:23 -0000 1.4 *************** *** 1 **** ! <?xml version="1.0"?> <!-- $Id$ $Revision$ $Date$ --> <project name="Apps Unit" basedir="." default="all"> <!-- Load local and user build preferences --> <property file="${user.home}/build.properties"/> <property file="build.properties"/> <!-- ========== Initialization Properties ================================= --> <property name="version" value="0_1_prerelease"/> <property name="build.dir" value="build"/> <!-- Should Java compilations set the debug compiler option? --> <property name="compile.debug" value="off" /> <!-- Should Java compilations set the deprecation compiler option? --> <property name="compile.deprecation" value="true" /> <!-- Should Java compilations set the optimize compiler option? --> <property name="compile.optimize" value="true" /> <!-- ========== Derived Properties ======================================== --> <property name="source.dir" value="./src"/> <!-- where the zipped distros are stored --> <property name="dist.dir" value="${build.dir}/dist"/> <!-- working directories where the distros are prepared --> <property name="dist.source.dir" value="${build.dir}/source_distribution"/> <property name="dist.bin.dir" value="${build.dir}/bin_distribution"/> <property name="dist.class.dir" value="${build.dir}/classes"/> <property name="checkstyle.result.dir" value="${build.dir}/checkstyle"/> <property name="pmd.result.dir" value="${build.dir}/pmd"/> <!-- compilation Classpath --> <path id="compile.classpath"> <pathelement location="${junit.jar}"/> <pathelement location="${commons-dbcp.jar}"/> <pathelement location="${commons-pool.jar}"/> </path> <!-- ========== Executable Targets ======================================== --> <target name="clean" description="clean build structure"> <delete dir="${build.dir}"/> </target> <target name="init" description="initialise build structure"> </target> <target name="build" description="build project" depends="init, init-build, build-bin, build-source"/> <target name="init-build"> <mkdir dir="${dist.dir}"/> </target> <target name="build-bin" depends="init-build"> <!-- create binary distribution --> <mkdir dir="${dist.bin.dir}"/> <copy todir="${dist.bin.dir}"> <fileset dir="${basedir}"> <include name="STATUS"/> <include name="README"/> <include name="cpl-v10.html"/> <include name="resources/**"/> </fileset> </copy> <!-- compile the java code --> <mkdir dir="${dist.class.dir}"/> <javac srcdir="${source.dir}" destdir="${dist.class.dir}" debug="${compile.debug}" optimize="${compile.optimize}" deprecation="${compile.deprecation}"> <exclude name="resources/**" /> <exclude name="**/package.html"/> <exclude name="**/overview.html"/> <classpath refid="compile.classpath"/> <!--compilerarg value="-Xlint:unchecked"/--> </javac> <jar basedir="${dist.class.dir}" destfile="${dist.bin.dir}/appsunit_${version}.jar"/> <zip basedir="${dist.bin.dir}" zipfile="${dist.dir}/appsunit_${version}.zip" compress="true"/> </target> <target name="build-source" depends="init-build"> <!-- create source distribution --> <mkdir dir="${dist.source.dir}"/> <copy todir="${dist.source.dir}"> <fileset dir="${basedir}"> <include name="STATUS"/> <include name="README"/> <include name="build.properties.sample"/> <include name="build.xml"/> <include name="cpl-v10.html"/> <include name="src/**"/> <include name="tst/**"/> <include name="resources/**"/> </fileset> </copy> <zip basedir="${dist.source.dir}" zipfile="${dist.dir}/appsunit_source_${version}.zip" compress="true"> </zip> </target> <target name="javadoc" description="generate javadocs"> </target> <!-- run unit tests --> <target name="test" description="test project"> </target> <!-- checkstyle targets --> <!-- run checkstyle --> <target name="checkstyle" description="run checkstyle on the project"> <taskdef resource="checkstyletask.properties" classpath="${checkstyle.jar}"/> <mkdir dir="${checkstyle.result.dir}"/> <checkstyle config="${checkstyle.config}" failureProperty="checkstyle.failure" failOnViolation="false"> <formatter type="plain"/> <formatter type="xml" tofile="${checkstyle.result.dir}/checkstyle_report.xml"/> <fileset dir="${source.dir}" includes="**/*.java"/> </checkstyle> <style in="${checkstyle.result.dir}/checkstyle_report.xml" out="${checkstyle.result.dir}/checkstyle_report.html" style="${checkstyle.xsl}"/> </target> <!-- run pmd --> <target name="pmd" description="run pmd on the project"> <mkdir dir="${pmd.result.dir}"/> <path id="pmd.classpath"> <fileset dir="${pmd.lib}"> <include name="*.jar"/> </fileset> </path> <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath"/> <pmd rulesetfiles="unusedcode,basic,imports,design,controversial,strings" targetjdk="1.5"> <formatter type="net.sourceforge.pmd.renderers.HTMLRenderer" toFile="${pmd.result.dir}/standard-pmd.html"/> <formatter type="xml" toFile="${pmd.result.dir}/pmd.xml"/> <formatter type="text" toConsole="true"/> <fileset dir="${source.dir}"> <include name="**/*.java"/> </fileset> </pmd> <replace file="${pmd.result.dir}/pmd.xml"> <replacefilter token="${basedir}/" value=""/> <replacefilter token="${basedir}\" value=""/> <replacefilter token="\" value="/"/> </replace> <xslt in="${pmd.result.dir}/pmd.xml" style="${pmd.xsl}" out="${pmd.result.dir}/pmd.html" /> </target> <target name="run" description="run project"> </target> <target name="audit" description="audit project" depends="checkstyle, pmd, test"> </target> <target name="debug" description="debug project"> <echo message="Welcome to Apps Unit Report."/> <echo message="Currently there's no (need for a) debug target."/> <echo message="Common targets:"/> <echo message=" - ant build: build the project."/> <echo message=" - ant run: execute examples."/> <echo message=" - ant test: test the project."/> <echo message=" - ant audit: audit the project."/> </target> <target name="all" description="run all targets"> <echo message="Welcome to Apps Report."/> <echo message="Common targets:"/> <echo message=" - ant build: build the project."/> <echo message=" - ant run: execute examples."/> <echo message=" - ant test: test the project."/> <echo message=" - ant audit: audit the project."/> </target> </project> \ No newline at end of file --- 1 ---- ! <?xml version="1.0"?> <!-- $Id$ $Revision$ $Date$ --> <project name="Apps Unit" basedir="." default="all"> <!-- Load local and user build preferences --> <property file="${user.home}/build.properties"/> <property file="build.properties"/> <!-- ========== Initialization Properties ================================= --> <property name="build.dir" value="build"/> <!-- Should Java compilations set the debug compiler option? --> <property name="compile.debug" value="off" /> <!-- Should Java compilations set the deprecation compiler option? --> <property name="compile.deprecation" value="true" /> <!-- Should Java compilations set the optimize compiler option? --> <property name="compile.optimize" value="true" /> <!-- ========== Derived Properties ======================================== --> <property name="source.dir" value="./src"/> <!-- The javadoc output directory --> <property name="java-doc.dir" value="${build.dir}/javadoc" /> <!-- where the zipped distros are stored --> <property name="dist.dir" value="${build.dir}/dist"/> <!-- working directories where the distros are prepared --> <property name="dist.source.dir" value="${build.dir}/source_distribution"/> <property name="dist.bin.dir" value="${build.dir}/bin_distribution"/> <property name="dist.class.dir" value="${build.dir}/classes"/> <property name="checkstyle.result.dir" value="${build.dir}/checkstyle"/> <property name="pmd.result.dir" value="${build.dir}/pmd"/> <!-- compilation Classpath --> <path id="compile.classpath"> <pathelement location="${junit.jar}"/> <pathelement location="${commons-dbcp.jar}"/> <pathelement location="${commons-pool.jar}"/> </path> <!-- ========== Executable Targets ======================================== --> <target name="clean" description="clean build structure"> <delete dir="${build.dir}"/> </target> <target name="init" description="initialise build structure"> <tstamp/> <!-- file where version numbers are defined --> <property file="version.properties"/> </target> <target name="build" description="build project" depends="init, init-build, build-bin, build-source"/> <target name="init-build"> <mkdir dir="${dist.dir}"/> </target> <target name="build-bin" depends="init-build"> <!-- create binary distribution --> <mkdir dir="${dist.bin.dir}"/> <copy todir="${dist.bin.dir}"> <fileset dir="${basedir}"> <include name="STATUS"/> <include name="README"/> <include name="cpl-v10.html"/> <include name="resources/**"/> </fileset> </copy> <!-- compile the java code --> <mkdir dir="${dist.class.dir}"/> <javac srcdir="${source.dir}" destdir="${dist.class.dir}" debug="${compile.debug}" optimize="${compile.optimize}" deprecation="${compile.deprecation}"> <exclude name="resources/**" /> <exclude name="**/package.html"/> <exclude name="**/overview.html"/> <classpath refid="compile.classpath"/> <!--compilerarg value="-Xlint:unchecked"/--> </javac> <jar basedir="${dist.class.dir}" destfile="${dist.bin.dir}/appsunit_${version}.jar"/> <zip basedir="${dist.bin.dir}" zipfile="${dist.dir}/appsunit_${version}.zip" compress="true"/> </target> <target name="build-source" depends="init-build"> <!-- create source distribution --> <mkdir dir="${dist.source.dir}"/> <copy todir="${dist.source.dir}"> <fileset dir="${basedir}"> <include name="STATUS"/> <include name="README"/> <include name="build.properties.sample"/> <include name="build.xml"/> <include name="cpl-v10.html"/> <include name="src/**"/> <include name="tst/**"/> <include name="resources/**"/> </fileset> </copy> <zip basedir="${dist.source.dir}" zipfile="${dist.dir}/appsunit_source_${version}.zip" compress="true"> </zip> </target> <target name="javadoc" description="generate javadocs"> <delete dir="${java-doc.dir}"/> <mkdir dir="${java-doc.dir}"/> <tstamp> <format property="copyright.now" pattern = "2006 - yyyy" locale="en"/> </tstamp> <javadoc destdir="${java-doc.dir}" author="true" version="true" use="true" classpathref="compile.classpath" windowtitle="Apps Unit}" Overview="${source.dir}/overview.html"> <fileset dir="${source.dir}" defaultexcludes="yes"> <include name="**/*.java"/> </fileset> <arg value="-quiet"/> <doctitle><![CDATA[<h1>Apps Unit</h1>]]></doctitle> <bottom><![CDATA[<i>Apps Unit. Copyright © ${copyright.now} appsunit.sourceforge.net. All Rights Reserved.</i>]]></bottom> </javadoc> </target> <!-- run unit tests --> <target name="test" description="test project"> </target> <!-- checkstyle targets --> <!-- run checkstyle --> <target name="checkstyle" description="run checkstyle on the project"> <taskdef resource="checkstyletask.properties" classpath="${checkstyle.jar}"/> <mkdir dir="${checkstyle.result.dir}"/> <checkstyle config="${checkstyle.config}" failureProperty="checkstyle.failure" failOnViolation="false"> <formatter type="plain"/> <formatter type="xml" tofile="${checkstyle.result.dir}/checkstyle_report.xml"/> <fileset dir="${source.dir}" includes="**/*.java"/> </checkstyle> <style in="${checkstyle.result.dir}/checkstyle_report.xml" out="${checkstyle.result.dir}/checkstyle_report.html" style="${checkstyle.xsl}"/> </target> <!-- run pmd --> <target name="pmd" description="run pmd on the project"> <mkdir dir="${pmd.result.dir}"/> <path id="pmd.classpath"> <fileset dir="${pmd.lib}"> <include name="*.jar"/> </fileset> </path> <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath"/> <pmd rulesetfiles="unusedcode,basic,imports,design,controversial,strings" targetjdk="1.5"> <formatter type="net.sourceforge.pmd.renderers.HTMLRenderer" toFile="${pmd.result.dir}/standard-pmd.html"/> <formatter type="xml" toFile="${pmd.result.dir}/pmd.xml"/> <formatter type="text" toConsole="true"/> <fileset dir="${source.dir}"> <include name="**/*.java"/> </fileset> </pmd> <replace file="${pmd.result.dir}/pmd.xml"> <replacefilter token="${basedir}/" value=""/> <replacefilter token="${basedir}\" value=""/> <replacefilter token="\" value="/"/> </replace> <xslt in="${pmd.result.dir}/pmd.xml" style="${pmd.xsl}" out="${pmd.result.dir}/pmd.html" /> </target> <target name="run" description="run project"> </target> <target name="audit" description="audit project" depends="checkstyle, pmd, test"> </target> <target name="debug" description="debug project"> <echo message="Welcome to Apps Unit Report."/> <echo message="Currently there's no (need for a) debug target."/> <echo message="Common targets:"/> <echo message=" - ant build: build the project."/> <echo message=" - ant run: execute examples."/> <echo message=" - ant test: test the project."/> <echo message=" - ant audit: audit the project."/> </target> <target name="all" description="run all targets"> <echo message="Welcome to Apps Report."/> <echo message="Common targets:"/> <echo message=" - ant build: build the project."/> <echo message=" - ant run: execute examples."/> <echo message=" - ant test: test the project."/> <echo message=" - ant audit: audit the project."/> </target> </project> \ No newline at end of file |