diff options
author | Shevek <[email protected]> | 2008-03-21 23:05:04 +0000 |
---|---|---|
committer | Shevek <[email protected]> | 2008-03-21 23:05:04 +0000 |
commit | 5ff55648127c8a8e1b9829775045af986e37647c (patch) | |
tree | b28209b1efe12824fbdcabd4ee9073e93ca30636 /etc/targets | |
parent | fca34200881fcaf7b84b4210f7a5f40c8925c4d1 (diff) |
move stuff into trunk
Diffstat (limited to 'etc/targets')
-rw-r--r-- | etc/targets/global-checkstyle.xml | 23 | ||||
-rw-r--r-- | etc/targets/global-clean.xml | 8 | ||||
-rw-r--r-- | etc/targets/global-cobertura.xml | 35 | ||||
-rw-r--r-- | etc/targets/global-compile.xml | 35 | ||||
-rw-r--r-- | etc/targets/global-findbugs.xml | 47 | ||||
-rw-r--r-- | etc/targets/global-inject.xml | 20 | ||||
-rw-r--r-- | etc/targets/global-jar.xml | 35 | ||||
-rw-r--r-- | etc/targets/global-javadoc.xml | 53 | ||||
-rw-r--r-- | etc/targets/global-junit.xml | 99 | ||||
-rw-r--r-- | etc/targets/global-tar.xml | 84 | ||||
-rw-r--r-- | etc/targets/global-taskdefs.xml | 65 | ||||
-rw-r--r-- | etc/targets/global-verify.xml | 23 | ||||
-rw-r--r-- | etc/targets/global-vpp.xml | 32 |
13 files changed, 559 insertions, 0 deletions
diff --git a/etc/targets/global-checkstyle.xml b/etc/targets/global-checkstyle.xml new file mode 100644 index 0000000..5c15352 --- /dev/null +++ b/etc/targets/global-checkstyle.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-checkstyle" basedir="."> + + <target name="global-checkstyle" depends="global-vpp" + unless="test.no.checkstyle"> + + <mkdir dir="${global.dir.build.reports}" /> + + <!-- XXX: Stupid checkstyle task doesn't expand it's parameters --> + <checkstyle config="etc/checkstyle/config.xml" + failOnViolation="false"> + <classpath refid="checkstyle-classpath" /> + <fileset dir="${global.dir.build.java}" /> + <formatter type="xml" + toFile="${global.dir.build.reports}/checkstyle.xml" /> + <formatter type="plain" + toFile="${global.dir.build.reports}/checkstyle.txt" /> + </checkstyle> + + </target> + +</project> diff --git a/etc/targets/global-clean.xml b/etc/targets/global-clean.xml new file mode 100644 index 0000000..246a2d0 --- /dev/null +++ b/etc/targets/global-clean.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-clean" basedir="."> + <target name="global-clean"> + <delete dir="${global.dir.root}/build" /> + <delete dir="${global.dir.root}/webroot" /> + </target> +</project> diff --git a/etc/targets/global-cobertura.xml b/etc/targets/global-cobertura.xml new file mode 100644 index 0000000..425a9fd --- /dev/null +++ b/etc/targets/global-cobertura.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-cobertura" basedir="."> + + <target name="global-cobertura-instrument" depends="global-taskdefs" + unless="test.no.cobertura"> + <delete dir="${global.dir.build.cobertura}" /> + <mkdir dir="${global.dir.build.cobertura}" /> + + <cobertura-instrument + todir="${global.dir.build.cobertura}" + datafile="${global.dir.build.cobertura}/cobertura.ser"> + <fileset dir="${global.dir.build.classes}"> + <include name="**/*.class" /> + <exclude name="**/Main.class" /> + <exclude name="**/cmd/**" /> + <exclude name="**/soap/port/*/*PortSoapBindingStub.class" /> + <exclude name="**/soap/port/*/*PortServiceLocator.class" /> + <exclude name="**/soap/port/*/*PortService.class" /> + </fileset> + </cobertura-instrument> + + </target> + + <target name="global-cobertura-report" depends="global-taskdefs" + unless="test.no.cobertura"> + <cobertura-report + format="html" + datafile="${global.dir.build.cobertura}/cobertura.ser" + destdir="${global.dir.build.reports}/cobertura" + srcdir="${global.dir.build.java}" /> + </target> + + +</project> diff --git a/etc/targets/global-compile.xml b/etc/targets/global-compile.xml new file mode 100644 index 0000000..b226041 --- /dev/null +++ b/etc/targets/global-compile.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-compile" basedir="."> + + <target name="global-compile" depends="global-vpp"> + <mkdir dir="${global.dir.build.classes}" /> + <mkdir dir="${global.dir.build.depcache}" /> + <mkdir dir="${global.dir.build.java}" /> + + <depend + srcdir="${global.dir.build.java}" + destdir="${global.dir.build.classes}" + cache="${global.dir.build.depcache}" + closure="yes"> + </depend> + + <javac + srcdir="${global.dir.build.java}" + destdir="${global.dir.build.classes}" + optimize="${system.javac.optimize}" + debug="${system.javac.debug}" + source="${system.javac.source}" + target="${system.javac.target}" + deprecation="${system.javac.deprecation}" + > + <classpath refid="compile-classpath" /> + <!-- + <compilerarg compiler="modern" value="-Xlint:unchecked" /> + --> + <compilerarg compiler="modern" value="-Xlint:deprecation" /> + <compilerarg compiler="modern" value="-Xlint:finally" /> + </javac> + </target> + +</project> diff --git a/etc/targets/global-findbugs.xml b/etc/targets/global-findbugs.xml new file mode 100644 index 0000000..9a06996 --- /dev/null +++ b/etc/targets/global-findbugs.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-findbugs" basedir="."> + + <!-- Used to depend on compile. --> + <target name="global-findbugs" depends="global-taskdefs"> + <delete dir="${global.dir.build.reports}/findbugs-output" /> + <mkdir dir="${global.dir.build.reports}/findbugs-output" /> + <findbugs + home="${global.dir.lib}/findbugs" + output="xml" + outputFile="${global.dir.build.reports}/findbugs-output/findbugs.xml" > + <sourcePath path="${global.dir.build.java}" /> + <class location="${global.dir.build.classes}" /> + <auxClasspath refid="compile-classpath" /> + </findbugs> + + </target> + + <target name="global-findbugs-report" depends="global-taskdefs"> + <xslt + basedir="${global.dir.build.reports}/findbugs-output" + destdir="${global.dir.build.reports}/findbugs" + extension=".html" + style="${global.dir.lib}/findbugs/xsl/plain.xsl"> + </xslt> + </target> + + <target name="global-findbugs-gui" depends="global-taskdefs"> + <java + fork="true" + spawn="true" + classname="edu.umd.cs.findbugs.gui.FindBugsFrame"> + <classpath> + <fileset dir="${global.dir.lib}/findbugs/lib" /> + </classpath> + <sysproperty + key="findbugs.home" + value="${global.dir.lib}/findbugs" /> + <jvmarg value="-Xmx768m" /> + <arg value="-loadbugs" /> + <arg value="${global.dir.build.reports}/findbugs-output/findbugs.xml" /> + </java> + </target> + + +</project> diff --git a/etc/targets/global-inject.xml b/etc/targets/global-inject.xml new file mode 100644 index 0000000..e707b04 --- /dev/null +++ b/etc/targets/global-inject.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-inject" basedir="."> + + <target name="global-inject"> + <inject> + <fileset dir="${global.dir.build.classes}"> + <include name="**/*.class" /> + </fileset> + <criteria> + <!-- <includeClass class="org.jboss.util.stream.*"/> --> + <!-- <excludeClass class="java.lang.reflect.*"/> --> + <!-- <excludeMethod method="get*"/> --> + <!-- <excludeMethod method="set*"/> --> + </criteria> + </inject> + + </target> + +</project> diff --git a/etc/targets/global-jar.xml b/etc/targets/global-jar.xml new file mode 100644 index 0000000..22b6cd4 --- /dev/null +++ b/etc/targets/global-jar.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-jar" basedir="."> + + <target name="global-jar" depends="global-compile"> + <delete dir="${global.dir.build.jar}" /> + <mkdir dir="${global.dir.build.jar}" /> + <mkdir dir="${global.dir.build.tar}/lib" /> + <mkdir dir="${global.dir.src.resources}" /> + + <copy todir="${global.dir.build.jar}"> + <fileset dir="${global.dir.build.java}"> + <include name="**/*.dat" /> + </fileset> + <fileset dir="${global.dir.build.classes}"> + <include name="**" /> + </fileset> + <fileset dir="${global.dir.src.resources}"> + <include name="log4j.properties" /> + </fileset> + </copy> + + <jar + destfile="${global.file.jar}" + manifest="etc/MANIFEST" + index="true" + compress="${system.jar.compress}"> + <fileset dir="${global.dir.build.jar}" /> + <manifest> + <attribute name="Built-By" value="${user.name}" /> + </manifest> + </jar> + </target> + +</project> diff --git a/etc/targets/global-javadoc.xml b/etc/targets/global-javadoc.xml new file mode 100644 index 0000000..db48b03 --- /dev/null +++ b/etc/targets/global-javadoc.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-javadoc" basedir="."> + + <target name="global-javadoc" depends="global-vpp" unless="build.no.javadoc"> + <javadoc + sourcepath="${global.dir.build.java}:${global.dir.src.docs}/javadoc" + destdir="${global.dir.build.javadoc}" + classpathref="compile-classpath" + source="${system.javac.source}" + access="${system.javadoc.access}" + use="true" + splitindex="false" + failonerror="true" + windowtitle="Anarres C Preprocessor version ${global.version}" + > + + <package name="org.anarres.cpp" /> + <packageset dir="${global.dir.build.java}" /> + + <link + href="http://java.sun.com/j2se/1.5.0/docs/api/" + offline="${system.javadoc.offline}" /> + <link + href="http://java.sun.com/j2ee/1.4/docs/api/" + offline="${system.javadoc.offline}" /> + <link + href="http://java.sun.com/products/servlet/2.3/javadoc/" + offline="${system.javadoc.offline}" /> + <link + href="http://ws.apache.org/axis/java/apiDocs/" + offline="${system.javadoc.offline}" /> + <link + href="http://www.jdom.org/docs/apidocs/" + offline="${system.javadoc.offline}" /> + <link + href="http://www.junit.org/junit/javadoc/3.8.1/" + offline="${system.javadoc.offline}" /> + <link + href="http://jakarta.apache.org/commons/configuration/apidocs/" + offline="${system.javadoc.offline}" /> + <link + href="http://www.jajakarta.org/ant/ant-1.6.1/docs/ja/manual/api/" + offline="${system.javadoc.offline}" /> +<!-- href="http://www.cs.bris.ac.uk/Teaching/Resources/General/ant/docs/manual/api/" --> + <tag dir="${global.dir.etc}/javadoc" /> + + <bottom><![CDATA[Copyright © 2007 <a href="http://www.anarres.org/">Shevek, Anarres</a>. All Rights Reserved.]]></bottom> + </javadoc> + + </target> + +</project> diff --git a/etc/targets/global-junit.xml b/etc/targets/global-junit.xml new file mode 100644 index 0000000..e53c5a7 --- /dev/null +++ b/etc/targets/global-junit.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-junit" basedir="."> + + <target name="global-junit" depends="global-taskdefs"> + <runtarget target="global-junit-compile" /> + <runtarget target="global-cobertura-instrument" /> + + <mkdir dir="${global.dir.build.reports}/junit-output" /> + <!-- This only sets the properties if they aren't set + - already. --> + <property name="test.package" value="" /> + <property name="test.case" value="" /> + <property name="test.all" value="" /> + <property name="test.root" value="${global.dir.build.tests}"/> + <property name="jrat.configuration" value="${global.dir.src.resources}/jrat.xml" /> + + <runtarget target="global-junit-cleanup" /> + + <junit + printsummary="yes" + showoutput="yes" + haltonfailure="no" + fork="yes" + forkmode="once" + > + <jvmarg value="-Xbootclasspath/p:${global.dir.build}/hacks/lib/boot.jar"/> + <classpath refid="junit-run-classpath"/> + <formatter type="plain" /> + <formatter type="xml" /> + <sysproperty key="net.sourceforge.cobertura.datafile" + file="${global.dir.build.cobertura}/cobertura.ser" /> + <sysproperty key="test.package" value="${test.package}" /> + <sysproperty key="test.case" value="${test.case}" /> + <sysproperty key="test.root" value="${test.root}" /> + <sysproperty key="test.all" value="${test.all}" /> + <sysproperty key="global.dir.build.classes" + value="${global.dir.build.classes}" /> + <sysproperty key="jrat.configuration" value="${jrat.configuration}" /> + + <assertions> + <enable/> + </assertions> + + <batchtest fork="yes" todir="${global.dir.build.reports}/junit-output"> + <fileset dir="${global.dir.build.tests}"> + <include name="AutoTestSuite.class" /> + </fileset> + </batchtest> + </junit> + + <delete dir="${global.dir.root}/webroot" /> + <delete dir="${global.dir.src.resources}/webapp/WEB-INF" /> + + + <runtarget target="global-junit-report" /> + <runtarget target="global-cobertura-report" /> + </target> + + <target name="global-junit-cleanup"> + <delete dir="${global.dir.root}/webroot" /> + </target> + + <target name="global-junit-compile"> + <delete dir="${global.dir.build.tests}" /> + <mkdir dir="${global.dir.src.tests}" /> + <mkdir dir="${global.dir.build.tests}" /> + + <javac + srcdir="${global.dir.src.tests}" + destdir="${global.dir.build.tests}" + optimize="false" + debug="true" + source="${system.javac.source}" + target="${system.javac.target}" + deprecation="${system.javac.deprecation}" + classpathref="junit-compile-classpath" + > + <!-- + <exclude name="**/master/**" /> + <exclude name="**/slave/**" /> + <exclude name="**/old/**" /> + --> + </javac> + </target> + + <target name="global-junit-report" depends="global-taskdefs"> + <junitreport + todir="${global.dir.build.reports}/junit-output"> + <fileset dir="${global.dir.build.reports}/junit-output"> + <include name="*.xml" /> + <exclude name="TESTS-TestSuites.xml" /> + </fileset> + <report format="frames" todir="${global.dir.build.reports}/junit" + styledir="${global.dir.etc}/junit/xsl"/> + </junitreport> + </target> + +</project> diff --git a/etc/targets/global-tar.xml b/etc/targets/global-tar.xml new file mode 100644 index 0000000..1b053ae --- /dev/null +++ b/etc/targets/global-tar.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-tar" basedir="."> + + <target name="global-tar" depends="global-jar,global-javadoc"> + <mkdir dir="${global.dir.build.dist}" /> + <mkdir dir="${global.dir.build.tar}/lib" /> + <mkdir dir="${global.dir.build.tar}/bin" /> + <mkdir dir="${global.dir.build.javadoc}" /> + + <copy todir="${global.dir.build.tar}/lib"> + <fileset dir="${global.dir.lib}/log4j"> + <include name="**/*.jar" /> + </fileset> + <mapper type="flatten" /> + </copy> + + <copy todir="${global.dir.build.tar}"> + <fileset dir="${global.dir.src.scripts}"> + <include name="cpp.sh" /> + </fileset> + <fileset dir="${global.dir.root}"> + <include name="LICENSE" /> + </fileset> + </copy> + + <copy todir="${global.dir.build.tar}/docs/api"> + <fileset dir="${global.dir.build.javadoc}" /> + </copy> + +<!-- + <copy todir="${global.dir.build.tar}/docs/examples"> + <fileset + dir="${global.dir.build.java}/org/anarres/cpp/examples"> + <include name="**" /> + </fileset> + </copy> +--> + + <chmod perm="a+x"> + <fileset dir="${global.dir.build.tar}/bin"> + <include name="**/*.pl"/> + </fileset> + <fileset dir="${global.dir.build.tar}"> + <include name="*.sh"/> + </fileset> + </chmod> + + <!-- <runtarget target="global-inject" /> --> + + <tar + destfile="${global.file.bintar}" + compression="gzip" + longfile="gnu"> + <tarfileset + dir="${global.dir.build.tar}" + prefix="${global.name}-bin-${global.version}" + username="root" group="root" + uid="0" gid="0" + > + <include name="**" /> + </tarfileset> + </tar> + + <tar + destfile="${global.file.srctar}" + compression="gzip" + longfile="gnu"> + <tarfileset + dir="${global.dir.root}" + prefix="${global.name}-src-${global.version}" + username="root" group="root" + uid="0" gid="0" + > + <include name="**" /> + <exclude name="build/**" /> + <exclude name="**/.*.swp" /> + <exclude name="src/scripts/release.sh" /> + </tarfileset> + </tar> + + </target> + +</project> diff --git a/etc/targets/global-taskdefs.xml b/etc/targets/global-taskdefs.xml new file mode 100644 index 0000000..8218c91 --- /dev/null +++ b/etc/targets/global-taskdefs.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-taskdefs"> + + <target name="global-taskdefs" unless="global.taskdefs.done"> + + <taskdef + resource="net/sf/antcontrib/antlib.xml" + classpathref="antcontrib-classpath" + loaderref="ant" /> + + <taskdef + resource="net/sf/antcontrib/antcontrib.properties" + classpathref="antcontrib-classpath" + loaderref="ant" /> + + <taskdef + resource="checkstyletask.properties" + classpathref="checkstyle-classpath" + loaderref="checkstyle" + /> + + <taskdef + resource="foundrylogic/vpp/taskdef.properties" + classpathref="vpp-classpath" + loaderref="vpp" /> + + <!-- + velocity-tools-generic-1.4.jar + jtidy-r8-21122004.jar + --> + + <taskdef name="injectcopy" + classname="org.shiftone.jrat.inject.ant.InjectCopyTask" + classpathref="jrat-classpath" + loaderref="jrat" /> + + <taskdef name="inject" + classname="org.shiftone.jrat.inject.ant.InjectTask" + classpathref="jrat-classpath" + loaderref="jrat" /> + + <taskdef + classpathref="cobertura-classpath" + resource="tasks.properties" + loaderref="cobratura" + /> + + <taskdef name="findbugs" + classname="edu.umd.cs.findbugs.anttask.FindBugsTask" + classpathref="findbugs-classpath" + loaderref="findbugs" /> + + <taskdef + name="svn" + classname="org.tigris.subversion.svnant.SvnTask" + classpathref="svn-classpath" + loaderref="svn" + /> + + <property name="global.taskdefs.done" value="true" /> + + </target> + +</project> diff --git a/etc/targets/global-verify.xml b/etc/targets/global-verify.xml new file mode 100644 index 0000000..11c8674 --- /dev/null +++ b/etc/targets/global-verify.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-verify" basedir="."> + + <target name="global-verify" depends="global-taskdefs"> + <!-- "master-jar,slave-jar,client-jar" --> + <mkdir dir="${global.dir.build.reports}" /> + + <verifydesign + design="${global.dir.etc}/design.xml" + jar="${master.file.jar}" /> + + <verifydesign + design="${global.dir.etc}/design.xml" + jar="${slave.file.jar}" /> + + <verifydesign + design="${global.dir.etc}/design.xml" + jar="${client.file.jar}" /> + + </target> + +</project> diff --git a/etc/targets/global-vpp.xml b/etc/targets/global-vpp.xml new file mode 100644 index 0000000..6ffc23d --- /dev/null +++ b/etc/targets/global-vpp.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="global-vpp"> + + <target name="global-vpp" depends="global-taskdefs"> + <mkdir dir="${global.dir.build.java}" /> + + <vppcopy todir="${global.dir.build.java}"> + <fileset dir="${global.dir.src.java}"> + <include name="**/*.java" /> + </fileset> + <config> + <context> + <!-- Avoid subversion and RCS tags. --> + <property key="Revision" value="\$Revision" /> + <property key="Id" value="\$Id" /> + <property key="Author" value="\$Author" /> + <property key="Date" value="\$Date" /> + <property key="URL" value="\$URL" /> + <property key="Rev" value="\$Rev" /> + <property key="SOA" value="\$SOA" /> + <property key="TTL" value="\$TTL" /> + <property key="DATASET" value="$DATASET" /> + <property key="_" value="\$_" /> + + <property key="version" value="${global.version}" /> + </context> + </config> + </vppcopy> + </target> + +</project> |