[junit4] 02/03: Build with maven-debian-helper instead of Ant
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Apr 27 15:32:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository junit4.
commit a9f765c10f13b583f1ea50307a1d8a6212eb9e4a
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Mon Apr 27 16:48:02 2015 +0200
Build with maven-debian-helper instead of Ant
---
debian/ant.properties | 3 --
debian/changelog | 7 +++-
debian/control | 7 +++-
debian/junit4.poms | 2 +-
debian/maven.ignoreRules | 3 ++
debian/patches/003_javadoc-fix.patch | 33 -----------------
debian/patches/exclude-dependency-sources.patch | 23 ++++++++++++
debian/patches/java7-ignore-test.patch | 26 -------------
debian/patches/java8-compatibility.patch | 49 -------------------------
debian/patches/manifest_jar.diff | 22 -----------
debian/patches/maven2-compatibility.patch | 14 +++++++
debian/patches/series | 6 +--
debian/rules | 21 ++---------
13 files changed, 57 insertions(+), 159 deletions(-)
diff --git a/debian/ant.properties b/debian/ant.properties
deleted file mode 100755
index 2ed7694..0000000
--- a/debian/ant.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-hamcrestlib=/usr/share/java/hamcrest-core.jar
-manifest=debian/MANIFEST.MF
-version-status=
diff --git a/debian/changelog b/debian/changelog
index 6f8b5e5..b55afaa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,10 @@
-junit4 (4.11-4) UNRELEASED; urgency=medium
+junit4 (4.12-1) UNRELEASED; urgency=medium
+ * New upstream release
+ - Build with maven-debian-helper instead of Ant
+ - New build dependency on libreplacer-java, libmaven-javadoc-plugin-java
+ and libmaven-enforcer-plugin-java
+ - Removed the patches
* Moved the package to Git
* debian/control: Standards-Version updated to 3.9.6 (no changes)
* Use XZ compression for the upstream tarball
diff --git a/debian/control b/debian/control
index a27cf26..a322c1d 100644
--- a/debian/control
+++ b/debian/control
@@ -8,11 +8,14 @@ Uploaders: Florian Weimer <fw at deneb.enyo.de>,
Jakub Adam <jakub.adam at ktknet.cz>,
Emmanuel Bourg <ebourg at apache.org>
Priority: optional
-Build-Depends: ant, cdbs, debhelper (>= 9), default-jdk
+Build-Depends: cdbs, debhelper (>= 9), default-jdk
Build-Depends-Indep: default-jdk-doc,
libhamcrest-java (>= 1.3),
libhamcrest-java-doc,
- maven-repo-helper
+ libmaven-enforcer-plugin-java,
+ libmaven-javadoc-plugin-java,
+ libreplacer-java,
+ maven-debian-helper
Standards-Version: 3.9.6
Vcs-Git: git://anonscm.debian.org/pkg-java/junit4.git
Vcs-Browser: http://anonscm.debian.org/cgit/pkg-java/junit4.git
diff --git a/debian/junit4.poms b/debian/junit4.poms
index 623bd24..aa380dd 100644
--- a/debian/junit4.poms
+++ b/debian/junit4.poms
@@ -1 +1 @@
-debian/pom.xml --no-parent
+pom.xml --no-parent --java-lib --has-package-version --usj-name=junit4
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..ea1cb2d
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,3 @@
+org.apache.maven.plugins maven-release-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
+org.codehaus.mojo animal-sniffer-maven-plugin * * * *
diff --git a/debian/patches/003_javadoc-fix.patch b/debian/patches/003_javadoc-fix.patch
deleted file mode 100644
index ad449c1..0000000
--- a/debian/patches/003_javadoc-fix.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Description: Links the documentation with the Javadoc installed locally for the JRE and Hamcrest
-Author: Emmanuel Bourg <ebourg at apache.org>
-Forwarded: not-needed
---- a/build.xml
-+++ b/build.xml
-@@ -140,21 +140,22 @@
- </exec>
- </target>
-
-- <target name="javadoc" depends="unjar.hamcrest">
-+ <target name="javadoc">
- <javadoc destdir="${javadocdir}"
- author="false"
- version="false"
- use="false"
-- windowtitle="JUnit API"
-- stylesheetfile="stylesheet.css"
-+ windowtitle="JUnit ${version} API"
-+ doctitle="JUnit ${version} API"
- >
- <excludepackage name="junit.*" />
- <excludepackage name="org.junit.internal.*" />
- <excludepackage name="org.junit.experimental.theories.internal.*" />
-
- <sourcepath location="${src}" />
-- <sourcepath location="${hamcrestsrc}" />
-- <link href="http://java.sun.com/javase/6/docs/api/" />
-+ <classpath path="${hamcrestlib}"/>
-+ <link href="/usr/share/doc/default-jre/api" />
-+ <link href="/usr/share/doc/libhamcrest-java/api" />
- </javadoc>
- </target>
-
diff --git a/debian/patches/exclude-dependency-sources.patch b/debian/patches/exclude-dependency-sources.patch
new file mode 100644
index 0000000..ecce3c0
--- /dev/null
+++ b/debian/patches/exclude-dependency-sources.patch
@@ -0,0 +1,23 @@
+Description: Don't include hamcrest in the Javadoc (the source artifact isn't available)
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/pom.xml
++++ b/pom.xml
+@@ -303,7 +303,7 @@
+ <minmemory>32m</minmemory>
+ <maxmemory>128m</maxmemory>
+ <failOnError>true</failOnError>
+- <includeDependencySources>true</includeDependencySources>
++ <includeDependencySources>false</includeDependencySources>
+ <dependencySourceIncludes>
+ <dependencySourceInclude>org.hamcrest:hamcrest-core:*</dependencySourceInclude>
+ </dependencySourceIncludes>
+@@ -407,7 +407,7 @@
+ <minmemory>32m</minmemory>
+ <maxmemory>128m</maxmemory>
+ <failOnError>true</failOnError>
+- <includeDependencySources>true</includeDependencySources>
++ <includeDependencySources>false</includeDependencySources>
+ <dependencySourceIncludes>
+ <dependencySourceInclude>org.hamcrest:hamcrest-core:*</dependencySourceInclude>
+ </dependencySourceIncludes>
diff --git a/debian/patches/java7-ignore-test.patch b/debian/patches/java7-ignore-test.patch
deleted file mode 100644
index df942a0..0000000
--- a/debian/patches/java7-ignore-test.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Description: This test case makes assumptions about the order
- of execution of tests in the Fruit.class test which are not
- guaranteed under Java 7.
- .
- This is being worked on upstream for a future release on JUnit.
-Author: James Page <james.page at ubuntu.com>
-Forwarded: not-needed
-
---- a/src/test/java/org/junit/tests/running/classes/ParentRunnerTest.java
-+++ b/src/test/java/org/junit/tests/running/classes/ParentRunnerTest.java
-@@ -10,6 +10,7 @@
- import org.hamcrest.Matcher;
- import org.hamcrest.TypeSafeMatcher;
- import org.junit.Test;
-+import org.junit.Ignore;
- import org.junit.runner.Description;
- import org.junit.runner.JUnitCore;
- import org.junit.runner.Request;
-@@ -39,6 +40,7 @@
- }
-
- @Test
-+ @Ignore
- public void useChildHarvester() throws InitializationError {
- log = "";
- ParentRunner<?> runner = new BlockJUnit4ClassRunner(FruitTest.class);
diff --git a/debian/patches/java8-compatibility.patch b/debian/patches/java8-compatibility.patch
deleted file mode 100644
index bdf83af..0000000
--- a/debian/patches/java8-compatibility.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Description: Fixes the build with Java 8
-Origin: upstream, https://github.com/junit-team/junit/commit/88f7a12
-Bug: https://github.com/junit-team/junit/issues/749
---- a/src/main/java/org/junit/runners/model/FrameworkMethod.java
-+++ b/src/main/java/org/junit/runners/model/FrameworkMethod.java
-@@ -87,9 +87,6 @@
- String state = isStatic ? "should" : "should not";
- errors.add(new Exception("Method " + fMethod.getName() + "() " + state + " be static"));
- }
-- if (!Modifier.isPublic(fMethod.getDeclaringClass().getModifiers())) {
-- errors.add(new Exception("Class " + fMethod.getDeclaringClass().getName() + " should be public"));
-- }
- if (!Modifier.isPublic(fMethod.getModifiers())) {
- errors.add(new Exception("Method " + fMethod.getName() + "() should be public"));
- }
---- a/src/test/java/org/junit/tests/AllTests.java
-+++ b/src/test/java/org/junit/tests/AllTests.java
-@@ -77,7 +77,6 @@
- import org.junit.tests.running.methods.TimeoutTest;
- import org.junit.tests.validation.BadlyFormedClassesTest;
- import org.junit.tests.validation.FailedConstructionTest;
--import org.junit.tests.validation.InaccessibleBaseClassTest;
- import org.junit.tests.validation.ValidationTest;
-
- // These test files need to be cleaned. See
-@@ -118,7 +117,6 @@
- JUnit38ClassRunnerTest.class,
- SystemExitTest.class,
- JUnitCoreReturnsCorrectExitCodeTest.class,
-- InaccessibleBaseClassTest.class,
- SuiteMethodTest.class,
- BadlyFormedClassesTest.class,
- IgnoreClassTest.class,
---- a/src/test/java/org/junit/tests/validation/InaccessibleBaseClassTest.java
-+++ /dev/null
-@@ -1,13 +0,0 @@
--package org.junit.tests.validation;
--
--import org.junit.Test;
--import org.junit.runners.BlockJUnit4ClassRunner;
--import org.junit.runners.model.InitializationError;
--import org.junit.tests.validation.anotherpackage.Sub;
--
--public class InaccessibleBaseClassTest {
-- @Test(expected = InitializationError.class)
-- public void inaccessibleBaseClassIsCaughtAtValidation() throws InitializationError {
-- new BlockJUnit4ClassRunner(Sub.class);
-- }
--}
diff --git a/debian/patches/manifest_jar.diff b/debian/patches/manifest_jar.diff
deleted file mode 100644
index 37da292..0000000
--- a/debian/patches/manifest_jar.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-Description: Update manifest (set in debian/ant.properties) to allow
- override for OSGI metadata.
-Author: Damien Raude-Morvan <drazzib at debian.org>
-Forwarded: no
-Last-Update: 2012-03-07
-
---- a/build.xml
-+++ b/build.xml
-@@ -96,11 +96,13 @@
- jarfile="${dist}/${binjar}"
- basedir="${bin}"
- excludes="${unjarred}, **/*.java, build.xml"
-+ manifest="${manifest}"
- />
- <jar
- jarfile="${dist}/${depjar}"
- basedir="${bin}"
- excludes="${unjarred}, org/hamcrest/**, **/*.java, build.xml"
-+ manifest="${manifest}"
- />
- </target>
-
diff --git a/debian/patches/maven2-compatibility.patch b/debian/patches/maven2-compatibility.patch
new file mode 100644
index 0000000..fe46cfa
--- /dev/null
+++ b/debian/patches/maven2-compatibility.patch
@@ -0,0 +1,14 @@
+Description: Remove the prerequisite on Maven 3
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/pom.xml
++++ b/pom.xml
+@@ -65,7 +65,7 @@
+ </mailingLists>
+
+ <prerequisites>
+- <maven>3.0.4</maven>
++ <maven>2.2.1</maven>
+ </prerequisites>
+
+ <scm>
diff --git a/debian/patches/series b/debian/patches/series
index abd9d57..4e20b4f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,2 @@
-manifest_jar.diff
-java7-ignore-test.patch
-003_javadoc-fix.patch
-java8-compatibility.patch
+maven2-compatibility.patch
+exclude-dependency-sources.patch
diff --git a/debian/rules b/debian/rules
index d0d7f0f..41f7d9e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,32 +1,17 @@
#!/usr/bin/make -f
-include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/maven.mk
-PACKAGE := $(DEB_SOURCE_PACKAGE)
-VERSION := $(DEB_UPSTREAM_VERSION)
JAVA_HOME := /usr/lib/jvm/default-java
-DEB_ANT_BUILD_TARGET := dist
-DEB_JARS := ant-nodeps hamcrest-core
-
-binary-post-install/junit4::
- sed "s/@artifactId@/junit/;s/@version@/$(VERSION)/" build/maven/junit-pom-template.xml > debian/pom.xml
- mh_installpoms -pjunit4
- mh_installjar -pjunit4 -njunit4 -l debian/pom.xml junit$(VERSION)/junit-dep-$(VERSION).jar
binary-post-install/junit4-doc::
- dh_install -pjunit4-doc junit$(VERSION)/javadoc/* /usr/share/doc/junit4/api/
+ dh_install -pjunit4-doc javadoc/latest/* /usr/share/doc/junit4/api/
clean::
- -rm debian/pom.xml
+ -rm -Rf javadoc
-rm src/main/java/junit/runner/Version.java
mh_clean
-upstream-from-git:
- git-archive --format=tar --prefix=junit4-$(DEB_UPSTREAM_VERSION)/ \
- v$(DEB_UPSTREAM_VERSION) | gzip -9 \
- > ../junit4_$(DEB_UPSTREAM_VERSION).orig.tar.gz
-
get-orig-source:
-uscan --upstream-version 0 --rename
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/junit4.git
More information about the pkg-java-commits
mailing list