--- surefire-2.4.3.orig/debian/maven.rules
+++ surefire-2.4.3/debian/maven.rules
@@ -0,0 +1,9 @@
+# keep the version for all Maven plugins as versionless plugins don't work
+* * maven-plugin *
+junit junit jar s/3\..*/3.x/
+junit junit jar s/4\..*/4.x/
+jmock jmock jar s/1\..*/1.x/
+# fix the version of maven-shade-plugin
+org.apache.maven.plugins maven-shade-plugin maven-plugin s/.*/1.2.1
+s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-plugin-testing-harness
+
--- surefire-2.4.3.orig/debian/maven-settings.xml
+++ surefire-2.4.3/debian/maven-settings.xml
@@ -0,0 +1,9 @@
+<!--
+  This is a minimal settings.xml that switches maven to offline mode
+  and uses the Debian repo as the local repo.
+-->
+
+<settings>
+  <localRepository>/usr/share/maven-repo</localRepository>
+  <offline>true</offline>
+</settings>
--- surefire-2.4.3.orig/debian/copyright
+++ surefire-2.4.3/debian/copyright
@@ -0,0 +1,46 @@
+This package was debianized by Torsten Werner <twerner@debian.org>.
+
+The Debian packaging is Copyright (c) 2008 Torsten Werner and is
+licensed under the GNU General Public License version 3. On Debian
+systems, the complete text of the GNU General Public License can be
+found in '/usr/share/common-licenses/GPL-3'.
+
+The package was downloaded from <http://maven.apache.org/surefire/>.
+
+Copyright: 2005-2008 The Apache Software Foundation.
+
+License:
+
+  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.
+
+The full text of the license can be found in
+`/usr/share/common-licenes/Apache-2.0'.
+
+----------
+
+Files: surefire-api/src/main/java/org/apache/maven/surefire/util/Nested*.java
+
+Copyright:
+
+  2005-2007 Spring Framework Project
+  2005-2008 The Apache Software Foundation.
+
+License: Apache 2.0 (see above)
+
+Those files have been originally developed by
+<http://www.springsource.org>.
--- surefire-2.4.3.orig/debian/rules
+++ surefire-2.4.3/debian/rules
@@ -0,0 +1,30 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+
+PACKAGE              := $(DEB_SOURCE_PACKAGE)
+VERSION              := $(DEB_UPSTREAM_VERSION)
+JAVA_HOME            := /usr/lib/jvm/java-6-openjdk
+DEB_JARS             := ant-nodeps maven-core maven-model maven-plugin-api maven-project file-management plexus-utils plexus-container-default-alpha
+DEB_ANT_BUILD_TARGET := package #javadoc
+DEB_ANT_BUILDFILE    := debian/build.xml
+DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
+API_DOCS             := target/api
+
+get-orig-source:
+	-uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
+
+binary-post-install/lib$(PACKAGE)-java::
+	mh_installpoms -plib$(PACKAGE)-java
+	mh_installjar -plib$(PACKAGE)-java -l surefire-api/pom.xml surefire-api/target/surefire-api-$(VERSION).jar
+	mh_installjar -plib$(PACKAGE)-java -l surefire-booter/pom.xml surefire-booter/target/surefire-booter-$(VERSION).jar
+	mh_installjar -plib$(PACKAGE)-java -l surefire-providers/surefire-junit/pom.xml surefire-providers/surefire-junit/target/surefire-junit-$(VERSION).jar
+	mh_installjar -plib$(PACKAGE)-java -l surefire-providers/surefire-junit4/pom.xml surefire-providers/surefire-junit4/target/surefire-junit4-$(VERSION).jar
+	mh_installjar -plib$(PACKAGE)-java -l surefire-providers/surefire-testng/pom.xml surefire-providers/surefire-testng/target/surefire-testng-$(VERSION).jar
+	mh_installjar -plib$(PACKAGE)-java -l maven-surefire-plugin/pom.xml maven-surefire-plugin/target/maven-surefire-plugin-$(VERSION).jar
+	mh_installjar -plib$(PACKAGE)-java -l maven-surefire-report-plugin/pom.xml maven-surefire-report-plugin/target/maven-surefire-report-plugin-$(VERSION).jar
+
+clean::
+	-rm -rf debian/tmp
--- surefire-2.4.3.orig/debian/orig-tar.sh
+++ surefire-2.4.3/debian/orig-tar.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+TAR=../surefire_$2.orig.tar.gz
+DIR=surefire-$2
+TAG=surefire-$2
+
+svn export http://svn.apache.org/repos/asf/maven/surefire/tags/$TAG $DIR
+tar -c -z -f $TAR $DIR
+rm -rf $DIR ../$TAG
+
+# move to directory 'tarballs'
+if [ -r .svn/deb-layout ]; then
+  . .svn/deb-layout
+  mv $TAR $origDir
+  echo "moved $TAR to $origDir"
+fi
--- surefire-2.4.3.orig/debian/changelog
+++ surefire-2.4.3/debian/changelog
@@ -0,0 +1,27 @@
+surefire (2.4.3-3) unstable; urgency=low
+
+  * Fix groupId for maven-plugin-testing-harness dependency
+    in the Maven POM.
+
+ -- Ludovic Claude <ludovic.claude@laposte.net>  Sun, 26 Jul 2009 16:11:15 +0100
+
+surefire (2.4.3-2) experimental; urgency=low
+
+  * Change section to java, bump up Standards-Version to 3.8.1
+  * Bump up debhelper to 6
+  * Migrate the build from cdbs-maven to cdbs-ant as Maven uses
+    this plugin for its build.
+  * Add a Build-Depends-Indep dependency on maven-repo-helper
+  * Use mh_installpom and mh_installjar to install the POM and the jar to the
+    Maven repository
+  * Remove the patch for the POM as it's no longer needed, as well as
+    the dependency on Quilt
+  * Remove Depends on Java runtimes as it is a library
+
+ -- Ludovic Claude <ludovic.claude@laposte.net>  Tue, 26 May 2009 21:03:39 +0100
+
+surefire (2.4.3-1) unstable; urgency=low
+
+  * Initial release. (Closes: #508829)
+
+ -- Torsten Werner <twerner@debian.org>  Mon, 05 Jan 2009 23:46:52 +0100
--- surefire-2.4.3.orig/debian/watch
+++ surefire-2.4.3/debian/watch
@@ -0,0 +1,3 @@
+version=3
+http://svn.apache.org/repos/asf/maven/surefire/tags/ \
+  surefire-(\d.*)/ debian debian/orig-tar.sh
--- surefire-2.4.3.orig/debian/build.xml
+++ surefire-2.4.3/debian/build.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+
+<project name="pkg-java" default="package" basedir="..">
+
+    <property file="debian/build.properties"/>
+    <property name="maven.build" value="/usr/share/maven-ant-helper/maven-build.xml"/>
+    <property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
+
+    <macrodef name="cleanmodule">
+	    <attribute name="dir"/>
+	    <sequential>
+		  <ant target="clean" antfile="${maven.build}" dir="@{dir}">
+            <property name="debian.dir" location="debian" />
+            <property name="project.dir" value="@{dir}" />
+          </ant> 
+	    </sequential>
+    </macrodef>
+
+    <macrodef name="packagemodule">
+	    <attribute name="dir"/>
+	    <sequential>
+		<ant target="package" antfile="${maven.build}" dir="@{dir}">
+          <property name="debian.dir" location="debian" />
+          <property name="project.dir" value="@{dir}" />
+          <property name="keep-cleaned-pom" value="true" />
+          <property name="use-local-repo" value="true" />
+		</ant>
+	    </sequential>
+    </macrodef>
+
+    <macrodef name="package-plugin-module">
+	    <attribute name="dir"/>
+	    <sequential>
+		<ant target="package" antfile="${maven.build}" dir="@{dir}">
+          <property name="debian.dir" location="debian" />
+          <property name="project.dir" value="@{dir}" />
+          <property name="maven.generate.target" value="plugin:descriptor" />
+          <property name="keep-cleaned-pom" value="true" />
+          <property name="use-local-repo" value="true" />
+		</ant>
+	    </sequential>
+    </macrodef>
+
+    <macrodef name="package-shaded-module">
+	    <attribute name="dir"/>
+	    <sequential>
+		<ant target="package" antfile="${maven.build}" dir="@{dir}">
+          <property name="debian.dir" location="debian" />
+          <property name="project.dir" value="@{dir}" />
+          <property name="maven.package.target" value="install" />
+          <property name="keep-cleaned-pom" value="true" />
+          <property name="use-local-repo" value="true" />
+		</ant>
+	    </sequential>
+    </macrodef>
+
+    <macrodef name="restore-pom">
+	    <attribute name="dir"/>
+	    <sequential>
+		<ant target="restore-pom" antfile="${maven.build}" dir="@{dir}">
+          <property name="debian.dir" location="debian" />
+          <property name="project.dir" value="@{dir}" />
+		</ant>
+	    </sequential>
+    </macrodef>
+
+    <target name="clean">
+        <cleanmodule dir=""/>
+        <cleanmodule dir="surefire-api"/>
+        <cleanmodule dir="surefire-booter"/>
+        <cleanmodule dir="surefire-providers/surefire-junit"/>
+        <cleanmodule dir="surefire-providers/surefire-junit4"/>
+        <cleanmodule dir="surefire-providers/surefire-testng"/>
+        <cleanmodule dir="maven-surefire-plugin"/>
+        <cleanmodule dir="maven-surefire-report-plugin"/>
+    </target>
+
+    <target name="package">
+        <packagemodule dir=""/>
+        <package-shaded-module dir="surefire-api"/>
+        <mkdir dir="debian/tmp/maven-repo/org/apache/maven/surefire/surefire-api/debian" /> 
+        <copy file="surefire-api/target/surefire-api-${version}.jar" 
+           tofile="debian/tmp/maven-repo/org/apache/maven/surefire/surefire-api/debian/surefire-api-debian.jar" />
+        <copy file="debian/tmp/pom.xml" 
+           tofile="debian/tmp/maven-repo/org/apache/maven/surefire/surefire-api/debian/surefire-api-debian.pom" />
+        <package-shaded-module dir="surefire-booter"/>
+        <copy file="surefire-booter/target/surefire-booter-${version}.jar" 
+           tofile="debian/tmp/maven-repo/org/apache/maven/surefire/surefire-booter/debian/surefire-booter-debian.jar" />
+        <copy file="debian/tmp/pom.xml"
+           tofile="debian/tmp/maven-repo/org/apache/maven/surefire/surefire-booter/debian/surefire-booter-debian.pom" />
+        <packagemodule dir="surefire-providers"/>
+        <packagemodule dir="surefire-providers/surefire-junit"/>
+        <packagemodule dir="surefire-providers/surefire-junit4"/>
+        <packagemodule dir="surefire-providers/surefire-testng"/>
+        <package-plugin-module dir="maven-surefire-plugin"/>
+        <package-plugin-module dir="maven-surefire-report-plugin"/>
+        <restore-pom dir=""/>
+        <restore-pom dir="surefire-api"/>
+        <restore-pom dir="surefire-booter"/>
+        <restore-pom dir="surefire-providers"/>
+        <restore-pom dir="surefire-providers/surefire-junit"/>
+        <restore-pom dir="surefire-providers/surefire-junit4"/>
+        <restore-pom dir="surefire-providers/surefire-testng"/>
+        <restore-pom dir="maven-surefire-plugin"/>
+        <restore-pom dir="maven-surefire-report-plugin"/>
+    </target>
+
+    <target name="javadoc">
+        <javadoc destdir="${javadoc.dir}">
+            <packageset dir="surefire-api/src/main/java/"/>
+            <packageset dir="surefire-booter/src/main/java/"/>
+            <packageset dir="surefire-providers/surefire-junit/src/main/java/"/>
+            <packageset dir="surefire-providers/surefire-junit4/src/main/java/"/>
+            <packageset dir="surefire-providers/surefire-testng/src/main/java/"/>
+            <packageset dir="maven-surefire-plugin/src/main/java/"/>
+            <packageset dir="maven-surefire-report-plugin/src/main/java/"/>
+        </javadoc>
+    </target>
+
+</project>
--- surefire-2.4.3.orig/debian/control
+++ surefire-2.4.3/debian/control
@@ -0,0 +1,36 @@
+Source: surefire
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
+Uploaders: Torsten Werner <twerner@debian.org>
+Build-Depends: debhelper (>= 5), cdbs, openjdk-6-jdk, quilt
+Build-Depends-Indep: maven-repo-helper, maven-ant-helper (>> 4), ant, ant-optional,
+ libmaven-clean-plugin-java, libmaven-compiler-plugin-java, libmaven-install-plugin-java, 
+ libmaven-jar-plugin-java, libmaven-resources-plugin-java, libmaven-shade-plugin-java,
+ libmaven-plugin-tools-java, libplexus-velocity-java, velocity,
+ junit, junit4, testng, libjmock-java
+Standards-Version: 3.8.1
+Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/surefire
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/surefire/
+Homepage: http://maven.apache.org/surefire/
+
+Package: libsurefire-java
+Architecture: all
+Depends: ${misc:Depends}, junit, junit4, testng, libjmock-java
+Description: Surefire test framework for Java
+ Maven is a software project management and comprehension tool. Based on the
+ concept of a project object model (POM), Maven can manage a project's build,
+ reporting and documentation from a central piece of information.
+ .
+ Maven's primary goal is to allow a developer to comprehend the complete
+ state of a development effort in the shortest period of time. In order to
+ attain this goal there are several areas of concern that Maven attempts
+ to deal with:
+ .
+    * Making the build process easy
+    * Providing a uniform build system
+    * Providing quality project information
+    * Providing guidelines for best practices development
+    * Allowing transparent migration to new features
+ .
+ This package ships the surefire test framework and the maven-surefire-plugin.
--- surefire-2.4.3.orig/debian/compat
+++ surefire-2.4.3/debian/compat
@@ -0,0 +1 @@
+5
--- surefire-2.4.3.orig/debian/libsurefire-java.poms
+++ surefire-2.4.3/debian/libsurefire-java.poms
@@ -0,0 +1,10 @@
+pom.xml --no-parent
+surefire-api/pom.xml
+surefire-booter/pom.xml
+surefire-providers/pom.xml
+surefire-providers/surefire-junit/pom.xml
+surefire-providers/surefire-junit4/pom.xml
+surefire-providers/surefire-testng/pom.xml
+maven-surefire-plugin/pom.xml
+maven-surefire-report-plugin/pom.xml
+
--- surefire-2.4.3.orig/debian/build.properties
+++ surefire-2.4.3/debian/build.properties
@@ -0,0 +1,23 @@
+javadoc.dir=target/api
+build.directory=target
+maven.test.skip=true
+classpath.compile = \
+            /usr/share/java/commons-lang.jar:\
+            /usr/share/java/plexus-utils.jar:\
+            /usr/share/java/junit.jar:\
+            /usr/share/java/junit4.jar:\
+            /usr/share/java/testng.jar:\
+            /usr/share/java/doxia-core.jar:\
+            /usr/share/java/doxia-logging-api.jar:\
+            /usr/share/java/doxia-sink-api.jar:\
+            /usr/share/java/doxia-site-renderer.jar:\
+            /usr/share/java/maven-artifact.jar:\
+            /usr/share/java/maven-artifact-manager.jar:\
+            /usr/share/java/maven-core.jar:\
+            /usr/share/java/maven-project.jar:\
+            /usr/share/java/maven-reporting-api.jar:\
+            /usr/share/java/maven-reporting-impl.jar:\
+            /usr/share/java/maven-toolchain.jar:\
+            ${basedir}/surefire-api/target/surefire-api-${version}.jar:\
+            ${basedir}/surefire-booter/target/surefire-booter-${version}.jar
+
--- surefire-2.4.3.orig/debian/patches/doxia_1.1.patch
+++ surefire-2.4.3/debian/patches/doxia_1.1.patch
@@ -0,0 +1,45 @@
+--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java
++++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java
+@@ -30,7 +30,7 @@
+ import org.apache.maven.project.MavenProject;
+ import org.apache.maven.reporting.AbstractMavenReport;
+ import org.apache.maven.reporting.MavenReportException;
+-import org.codehaus.doxia.site.renderer.SiteRenderer;
++import org.apache.maven.doxia.siterenderer.Renderer;
+ import org.codehaus.plexus.util.PathTool;
+ import org.codehaus.plexus.util.StringUtils;
+ 
+@@ -56,10 +56,10 @@
+     /**
+      * Doxia Site Renderer
+      *
+-     * @parameter expression="${component.org.codehaus.doxia.site.renderer.SiteRenderer}"
++     * @parameter expression="${component.org.apache.maven.doxia.siterenderer.Renderer}"
+      * @required @readonly
+      */
+-    private SiteRenderer siteRenderer;
++    private Renderer siteRenderer;
+ 
+     /**
+      * Maven Project
+@@ -230,7 +230,7 @@
+         return getBundle( locale ).getString( "report.surefire.description" );
+     }
+ 
+-    protected SiteRenderer getSiteRenderer()
++    protected Renderer getSiteRenderer()
+     {
+         return siteRenderer;
+     }
+--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
++++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
+@@ -20,8 +20,7 @@
+  */
+ 
+ import org.apache.maven.reporting.MavenReportException;
+-import org.codehaus.doxia.sink.Sink;
+-
++import org.apache.maven.doxia.sink.Sink;
+ import java.io.File;
+ import java.text.NumberFormat;
+ import java.util.Iterator;
--- surefire-2.4.3.orig/debian/patches/pom.patch
+++ surefire-2.4.3/debian/patches/pom.patch
@@ -0,0 +1,33 @@
+--- a/pom.xml
++++ b/pom.xml
+@@ -19,12 +19,6 @@
+ 
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+-  <parent>
+-    <artifactId>maven-parent</artifactId>
+-    <groupId>org.apache.maven</groupId>
+-    <version>7</version>
+-    <relativePath>../pom/maven/pom.xml</relativePath>
+-  </parent>
+   <groupId>org.apache.maven.surefire</groupId>
+   <artifactId>surefire</artifactId>
+   <packaging>pom</packaging>
+@@ -122,7 +116,7 @@
+       <scope>test</scope>
+     </dependency>
+   </dependencies>
+-  <build>
++<!--  <build>
+     <plugins>
+       <plugin>
+         <artifactId>maven-site-plugin</artifactId>
+@@ -154,7 +148,7 @@
+         </plugin>
+       </plugins>
+     </pluginManagement>
+-  </build>
++  </build> -->
+   <modules>
+     <module>surefire-api</module>
+     <module>surefire-booter</module>
--- surefire-2.4.3.orig/debian/patches/series
+++ surefire-2.4.3/debian/patches/series
@@ -0,0 +1,2 @@
+pom.patch
+doxia_1.1.patch
