cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r123719 - /cocoon/trunk/tools/targets/compile-build.xml /cocoon/trunk/tools/targets/samples-build.xml /cocoon/trunk/tools/targets/test-build.xml
Date Thu, 30 Dec 2004 14:37:27 GMT
Author: vgritsenko
Date: Thu Dec 30 06:37:26 2004
New Revision: 123719

URL: http://svn.apache.org/viewcvs?view=rev&rev=123719
Log:
add clover support

Modified:
   cocoon/trunk/tools/targets/compile-build.xml
   cocoon/trunk/tools/targets/samples-build.xml
   cocoon/trunk/tools/targets/test-build.xml

Modified: cocoon/trunk/tools/targets/compile-build.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/tools/targets/compile-build.xml?view=diff&rev=123719&p1=cocoon/trunk/tools/targets/compile-build.xml&r1=123718&p2=cocoon/trunk/tools/targets/compile-build.xml&r2=123719
==============================================================================
--- cocoon/trunk/tools/targets/compile-build.xml	(original)
+++ cocoon/trunk/tools/targets/compile-build.xml	Thu Dec 30 06:37:26 2004
@@ -22,11 +22,25 @@
 
   <!-- compiles everything -->
   <target name="compile"
-      depends="compile-core, compile-deprecated, compile-tests"/>
+          depends="compile-core, compile-deprecated, compile-tests"/>
 
-  <!-- compiles the core -->
-  <target name="compile-core" depends="prepare">
+  <!-- compiles mocks -->
+  <target name="compile-mocks" depends="prepare">
+    <mkdir dir="${build.mocks}"/>
+    <javac srcdir="${mocks}"
+           destdir="${build.mocks}"
+           debug="${compiler.debug}"
+           optimize="${compiler.optimize}"
+           deprecation="${compiler.deprecation}"
+           target="${target.vm}"
+           source="${source.vm}"
+           nowarn="${compiler.nowarn}"
+           compiler="${compiler}"
+           classpathref="classpath"/>
+  </target>
 
+  <!-- compiles the core -->
+  <target name="compile-core" depends="compile-mocks, clover.on">
     <!-- copy those files that need to be in the classpath -->
     <copy todir="${build.dest}">
       <fileset dir="${java}">
@@ -34,7 +48,6 @@
       </fileset>
     </copy>
 
-    <!-- compile core classes -->
     <echo message="Compiling Cocoon Core"/>
     <javac srcdir="${src.core}"
            destdir="${build.dest}"
@@ -44,23 +57,8 @@
            target="${target.vm}"
            source="${source.vm}"
            nowarn="${compiler.nowarn}"
-           compiler="${compiler}"
            classpathref="classpath"/>
 
-    <!-- compile mock classes -->
-    <mkdir dir="${build.mocks}"/>
-    <javac srcdir="${mocks}"
-           destdir="${build.mocks}"
-           debug="${compiler.debug}"
-           optimize="${compiler.optimize}"
-           deprecation="${compiler.deprecation}"
-           target="${target.vm}"
-           source="${source.vm}"
-           nowarn="${compiler.nowarn}"
-           compiler="${compiler}"
-           classpathref="classpath"/>
-
-    <!-- compile core source files -->
     <javac srcdir="${java}"
            destdir="${build.dest}"
            debug="${compiler.debug}"
@@ -69,20 +67,18 @@
            target="${target.vm}"
            source="${source.vm}"
            nowarn="${compiler.nowarn}"
-           compiler="${compiler}"
            classpathref="classpath"/>
   </target>
 
   <!-- compiles deprecated code -->
-  <target name="compile-deprecated" depends="prepare"
+  <target name="compile-deprecated" depends="prepare, clover.off"
           unless="internal.exclude.deprecated">
     <mkdir dir="${build.deprecated}"/>
-
-<!--
+    <!--
     <xpatch file="${build.dest}/org/apache/cocoon/cocoon.roles" 
             srcdir="${deprecated.conf}"
             includes="**/*.xroles"/>
--->
+    -->
     <javac srcdir="${deprecated.src}"
            destdir="${build.deprecated}"
            debug="${compiler.debug}"
@@ -94,7 +90,9 @@
            classpathref="classpath"/>
   </target>
 
-  <target name="compile-tests" depends="compile-core, compile-deprecated">
+  <!-- compiles tests classes -->
+  <target name="compile-tests"
+          depends="compile-core, compile-deprecated, clover.off">
     <mkdir dir="${build.test}"/>
 
     <!-- Copy test files to build test dir -->
@@ -131,7 +129,7 @@
 
   <!-- packages everything -->
   <target name="package"
-      depends="package-core, package-deprecated, package-testcase"/>
+          depends="package-core, package-deprecated, package-testcase"/>
 
   <!-- package the core -->
   <target name="package-core" depends="compile-core, block-roles">

Modified: cocoon/trunk/tools/targets/samples-build.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/tools/targets/samples-build.xml?view=diff&rev=123719&p1=cocoon/trunk/tools/targets/samples-build.xml&r1=123718&p2=cocoon/trunk/tools/targets/samples-build.xml&r2=123719
==============================================================================
--- cocoon/trunk/tools/targets/samples-build.xml	(original)
+++ cocoon/trunk/tools/targets/samples-build.xml	Thu Dec 30 06:37:26 2004
@@ -21,7 +21,8 @@
     Samples Targets
   </description>
 
-  <target name="samples" depends="prepare" unless="internal.exclude.webapp.samples">
+  <target name="samples" depends="prepare, clover.off"
+          unless="internal.exclude.webapp.samples">
     <mkdir dir="${build.samples}"/>
 
     <javac srcdir="${samples}"

Modified: cocoon/trunk/tools/targets/test-build.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/tools/targets/test-build.xml?view=diff&rev=123719&p1=cocoon/trunk/tools/targets/test-build.xml&r1=123718&p2=cocoon/trunk/tools/targets/test-build.xml&r2=123719
==============================================================================
--- cocoon/trunk/tools/targets/test-build.xml	(original)
+++ cocoon/trunk/tools/targets/test-build.xml	Thu Dec 30 06:37:26 2004
@@ -169,4 +169,51 @@
          inheritRefs="false"
          target="prepare-anteater-tests"/>
   </target>
+
+
+
+  <!--+
+      | Clover tasks
+      +-->
+  <target name="clover">
+    <available property="clover.present"
+               classname="com.cortexeb.tools.clover.tasks.CloverTask">
+      <classpath refid="classpath"/>
+    </available>
+    <!-- echo message="Clover present: ${clover.present}"/ -->
+  </target>
+
+  <target name="clover.init" depends="clover" if="clover.present">
+    <taskdef resource="clovertasks"/>
+  </target>
+
+  <target name="clover.on" depends="clover.init" if="clover.present">
+    <!-- echo message="Clover is ON!"/ -->
+    <echo message="Clover is present? ${clover.present}"/>
+    <clover-setup initString="${build}/clover/coverage.db"
+                  tmpdir="${build}/clover/src"
+                  preserve="false"
+                  enabled="true"/>
+  </target>
+
+  <target name="clover.off" depends="clover.init" if="clover.present">
+    <!-- echo message="Clover is OFF!"/ -->
+    <clover-setup enabled="false"/>
+  </target>
+
+  <target name="clover.historypoint" depends="clover.init" if="clover.present">
+    <clover-historypoint historyDir="${build}/clover/history"/>
+  </target>
+
+  <target name="clover.report" depends="init, clover.on" if="clover.present">
+    <clover-report>
+      <current outfile="${build}/clover-report">
+        <format type="html"/>
+      </current>
+      <historical outfile="${build}/clover-history"
+                  historyDir="${build}/clover/history">
+        <format type="html"/>
+      </historical>
+    </clover-report>
+  </target>
 </project>

Mime
View raw message