cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r614141 - in /cocoon/whiteboard/micro/misc/cocoon-webapp: cobertura-ant.xml pom.xml
Date Tue, 22 Jan 2008 08:27:11 GMT
Author: reinhard
Date: Tue Jan 22 00:27:08 2008
New Revision: 614141

URL: http://svn.apache.org/viewvc?rev=614141&view=rev
Log:
enable Cobertura for integration tests

Added:
    cocoon/whiteboard/micro/misc/cocoon-webapp/cobertura-ant.xml   (with props)
Modified:
    cocoon/whiteboard/micro/misc/cocoon-webapp/pom.xml

Added: cocoon/whiteboard/micro/misc/cocoon-webapp/cobertura-ant.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-webapp/cobertura-ant.xml?rev=614141&view=auto
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-webapp/cobertura-ant.xml (added)
+++ cocoon/whiteboard/micro/misc/cocoon-webapp/cobertura-ant.xml Tue Jan 22 00:27:08 2008
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<!-- @version $Id$ -->
+<project name="Cobertura Instrumentation and Reporting">
+
+  <taskdef classpath="${plugin_classpath}" resource="tasks.properties" />
+
+  <target name="instrument">
+    <delete file="${datafile}" />
+    <property name="jars.dir"
+              location="./target/cocoon-webapp/WEB-INF/lib"
+    />
+    <cobertura-instrument datafile="${datafile}">
+      <fileset dir="${jars.dir}">
+        <include name="cocoon-micro-*.jar" />
+      </fileset>
+    </cobertura-instrument>
+  </target>
+
+  <target name="report">
+    <property name="coveragereport.dir" value="./target/cobertura-coverage-report/" />
+    <mkdir dir="${coveragereport.dir}" />
+    <cobertura-report datafile="${datafile}" format="html" destdir="${coveragereport.dir}">
+      <fileset dir="../../core/cocoon-core/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-expression-language/cocoon-expression-language-api/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-pipeline/cocoon-pipeline-api/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-pipeline/cocoon-pipeline-components/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-sitemap/cocoon-sitemap-api/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-sitemap/cocoon-sitemap-components/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-store/cocoon-store-impl/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-thread/cocoon-thread-api/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-thread/cocoon-thread-impl/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-util/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-xml/cocoon-xml-api/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-xml/cocoon-xml-impl/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-xml/cocoon-xml-resolver/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+      <fileset dir="../../core/cocoon-xml/cocoon-xml-util/src/main/java">
+        <include name="**/*.java" />
+      </fileset>
+    </cobertura-report>
+  </target>
+
+</project>
\ No newline at end of file

Propchange: cocoon/whiteboard/micro/misc/cocoon-webapp/cobertura-ant.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/micro/misc/cocoon-webapp/cobertura-ant.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/micro/misc/cocoon-webapp/cobertura-ant.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cocoon/whiteboard/micro/misc/cocoon-webapp/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/misc/cocoon-webapp/pom.xml?rev=614141&r1=614140&r2=614141&view=diff
==============================================================================
--- cocoon/whiteboard/micro/misc/cocoon-webapp/pom.xml (original)
+++ cocoon/whiteboard/micro/misc/cocoon-webapp/pom.xml Tue Jan 22 00:27:08 2008
@@ -105,6 +105,13 @@
                 <phase>post-integration-test</phase>
               </execution>
             </executions>
+            <dependencies>
+              <dependency>
+                <groupId>net.sourceforge.cobertura</groupId>
+                <artifactId>cobertura</artifactId>
+                <version>1.9</version>
+              </dependency>
+            </dependencies>
           </plugin>
           <plugin>
             <artifactId>maven-surefire-plugin</artifactId>
@@ -130,6 +137,58 @@
                 </configuration>
               </execution>
             </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>cobertura-it</id>
+      <build>
+        <plugins>
+          <!-- Cobertura -->
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>cobertura-instrumentation</id>
+                <phase>package</phase>
+                <configuration>
+                  <tasks>
+                    <property name="plugin_classpath" refid="maven.plugin.classpath"/>
+                    <property name="datafile" value="${basedir}/target/cobertura.ser"/>
+                    <ant antfile="${basedir}/cobertura-ant.xml">
+                      <target name="instrument"/>
+                    </ant>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+              <execution>
+                <id>cobertura-report</id>
+                <phase>post-integration-test</phase>
+                <configuration>
+                  <tasks>
+                    <property name="plugin_classpath" refid="maven.plugin.classpath"/>
+                    <property name="datafile" value="${basedir}/target/cobertura.ser"/>
+                    <ant antfile="${basedir}/cobertura-ant.xml">
+                      <target name="report"/>
+                    </ant>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+            <dependencies>
+              <dependency>
+                <groupId>net.sourceforge.cobertura</groupId>
+                <artifactId>cobertura</artifactId>
+                <version>1.9</version>
+              </dependency>
+            </dependencies>
           </plugin>
         </plugins>
       </build>



Mime
View raw message