[mockito] 03/04: Build with gradle-debian-helper instead of javahelper

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Jun 28 13:33:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository mockito.

commit f1fb40cd02f813caa487da776c7e3866dcca3420
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue Jun 28 14:34:25 2016 +0200

    Build with gradle-debian-helper instead of javahelper
---
 debian/README.source                               |  10 -
 debian/changelog                                   |   4 +-
 debian/control                                     |  20 +-
 debian/copyright                                   |   7 +-
 debian/libmockito-java-doc.install                 |   1 +
 debian/libmockito-java-doc.javadoc                 |   1 -
 debian/libmockito-java.jlibs                       |   1 -
 debian/libmockito-java.poms                        |  29 +-
 debian/maven.ignoreRules                           |   4 +
 debian/maven.rules                                 |   2 +
 debian/patches/00-use_system_libraries.patch       | 298 ++++++++++-----------
 .../01-fix_FTBFS_with_hamcrest_interfaces.patch    |  36 +--
 debian/patches/02-disable-online-tests.patch       |  18 ++
 debian/patches/03-ignore-cobertura-plugin.patch    |  13 +
 debian/patches/04-gradle-compatibility.patch       |  14 +
 debian/patches/05-ignore-release-tasks.patch       |  31 +++
 debian/patches/series                              |   4 +
 debian/pom.xml                                     |  41 ---
 debian/rules                                       |  54 +---
 19 files changed, 292 insertions(+), 296 deletions(-)

diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644
index 72cf612..0000000
--- a/debian/README.source
+++ /dev/null
@@ -1,10 +0,0 @@
-mockito for Debian
-------------------
-
-The original source has been repacked because it contained various embedded
-jars, and had a structure not really usable for packaging.
-To get the tarball used to build this Debian package, do:
-
-    $ debian/rules get-orig-source
-
-  -- David Paleino <dapal at debian.org>  Mon, 15 Mar 2010 22:38:59 +0100
diff --git a/debian/changelog b/debian/changelog
index 868f403..9c653d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
-mockito (1.9.5+ds-4) UNRELEASED; urgency=medium
+mockito (1.10.19-1) UNRELEASED; urgency=medium
 
   * Team upload.
+  * New upstream release
+    - Build with gradle-debian-helper instead of javahelper
   * Depend on libasm-java (>= 5.0) instead of libasm4-java
   * Depend on libcglib-java (>= 3.1) instead of libcglib3-java
   * Standards-Version updated to 3.9.8
diff --git a/debian/control b/debian/control
index 16e124b..3dd0dd0 100644
--- a/debian/control
+++ b/debian/control
@@ -5,16 +5,18 @@ Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.or
 Uploaders:
  Markus Koschany <apo at debian.org>
 Build-Depends:
+ ant,
+ bnd,
  debhelper (>= 9),
- javahelper,
- maven-repo-helper (>= 1.7.1)
-Build-Depends-Indep:
+ gradle-debian-helper,
+ maven-repo-helper,
  default-jdk,
  junit4,
  libasm-java (>= 5.0),
  libcglib-java (>= 3.1),
  libhamcrest-java,
- libobjenesis-java
+ libobjenesis-java,
+ libspock-java
 Standards-Version: 3.9.8
 Vcs-Git: https://anonscm.debian.org/git/pkg-java/mockito.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/mockito.git
@@ -22,11 +24,8 @@ Homepage: http://mockito.org/
 
 Package: libmockito-java
 Architecture: all
-Depends:
- ${java:Depends},
- ${misc:Depends}
-Suggests:
- libmockito-java-doc
+Depends: ${misc:Depends}, libcglib-java (>= 3.1), libhamcrest-java, libobjenesis-java
+Suggests: libmockito-java-doc
 Description: mocking framework for Java
  Mockito is a mocking library which lets you write tests with a
  clean and simple API.
@@ -37,8 +36,7 @@ Description: mocking framework for Java
 Package: libmockito-java-doc
 Architecture: all
 Section: doc
-Depends:
- ${misc:Depends}
+Depends: ${misc:Depends}
 Description: mocking framework for Java - documentation
  Mockito is a mocking library which lets you write tests with a
  clean and simple API.
diff --git a/debian/copyright b/debian/copyright
index 16a4034..fab5b9c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -15,13 +15,12 @@ Copyright: 2010-2012, David Paleino <dapal at debian.org>
            2013-2016, Markus Koschany <apo at debian.org>
 License: MIT
 
-Files: org/mockito/internal/matchers/apachecommons/commons-lang-license.txt
-       org/mockito/internal/matchers/apachecommons/EqualsBuilder.java
+Files: src/org/mockito/internal/matchers/apachecommons/commons-lang-license.txt
+       src/org/mockito/internal/matchers/apachecommons/EqualsBuilder.java
 Copyright: Apache Software Foundation
 License: Apache-2.0
 
-Files: org/mockito/internal/creation/jmock/jmock-license.txt
-       org/mockito/internal/creation/jmock/SearchingClassLoader.java
+Files: src/org/mockito/internal/creation/util/SearchingClassLoader.java
 Copyright: 2000-2007, jMock.org
 License: BSD-3-clause
 
diff --git a/debian/libmockito-java-doc.install b/debian/libmockito-java-doc.install
new file mode 100644
index 0000000..7813ef3
--- /dev/null
+++ b/debian/libmockito-java-doc.install
@@ -0,0 +1 @@
+build/docs/javadoc/* usr/share/doc/libmockito-java/api
diff --git a/debian/libmockito-java-doc.javadoc b/debian/libmockito-java-doc.javadoc
deleted file mode 100644
index ce83b25..0000000
--- a/debian/libmockito-java-doc.javadoc
+++ /dev/null
@@ -1 +0,0 @@
-internal
diff --git a/debian/libmockito-java.jlibs b/debian/libmockito-java.jlibs
deleted file mode 100644
index da234c6..0000000
--- a/debian/libmockito-java.jlibs
+++ /dev/null
@@ -1 +0,0 @@
-mockito-core.jar
diff --git a/debian/libmockito-java.poms b/debian/libmockito-java.poms
index d8d992a..960fda1 100644
--- a/debian/libmockito-java.poms
+++ b/debian/libmockito-java.poms
@@ -1 +1,28 @@
-debian/pom.xml --no-parent --usj-name=mockito-core
+# List of POM files for the package
+# Format of this file is:
+# <path to pom file> [option]*
+# where option can be:
+#   --ignore: ignore this POM and its artifact if any
+#   --ignore-pom: don't install the POM. To use on POM files that are created
+#     temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
+#   --no-parent: remove the <parent> tag from the POM
+#   --package=<package>: an alternative package to use when installing this POM
+#      and its artifact
+#   --has-package-version: to indicate that the original version of the POM is the same as the upstream part
+#      of the version for the package.
+#   --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
+#      during a clean operation with mh_cleanpom or mh_installpom
+#   --artifact=<path>: path to the build artifact associated with this POM,
+#      it will be installed when using the command mh_install. [mh_install]
+#   --java-lib: install the jar into /usr/share/java to comply with Debian
+#      packaging guidelines
+#   --usj-name=<name>: name to use when installing the library in /usr/share/java
+#   --usj-version=<version>: version to use when installing the library in /usr/share/java
+#   --no-usj-versionless: don't install the versionless link in /usr/share/java
+#   --dest-jar=<path>: the destination for the real jar.
+#     It will be installed with mh_install. [mh_install]
+#   --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+#   --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
+#     Empty by default. [mh_install]
+#
+maven/mockito-core.pom --no-parent --java-lib --artifact=build/libs/mockito-core-*.jar --set-version=1.10.19
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..5fceece
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,4 @@
+com.jfrog.bintray.gradle gradle-bintray-plugin
+net.saliman gradle-cobertura-plugin
+org.codehaus.groovy.modules.http-builder http-builder
+org.kt3k.gradle.plugin coveralls-gradle-plugin
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..65cf7c7
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,2 @@
+junit junit * s/.*/4.x/ * *
+org.testng testng * s/.*/6.x/ * *
diff --git a/debian/patches/00-use_system_libraries.patch b/debian/patches/00-use_system_libraries.patch
index 94327f8..409b6aa 100644
--- a/debian/patches/00-use_system_libraries.patch
+++ b/debian/patches/00-use_system_libraries.patch
@@ -1,31 +1,11 @@
-From: Markus Koschany <apo at gambaru.de>
-Date: Sat, 15 Jun 2013 12:24:11 +0200
-Subject: 00 use_system_libraries
-
-Use Debian's libraries instead of the embedded libraries that are shipped with
-mockito.
-
+Description: Use Debian's libraries instead of the embedded libraries that are shipped with Mockito.
+Author: Markus Koschany <apo at gambaru.de>
 Forwarded: not-needed
----
- org/mockito/internal/creation/CglibMockMaker.java              |  4 ++--
- .../internal/creation/DelegatingMockitoMethodProxy.java        |  4 ++--
- org/mockito/internal/creation/MethodInterceptorFilter.java     |  6 +++---
- org/mockito/internal/creation/MockitoMethodProxy.java          |  4 ++--
- .../internal/creation/SerializableMockitoMethodProxy.java      |  4 ++--
- org/mockito/internal/creation/cglib/CGLIBHacker.java           |  4 ++--
- org/mockito/internal/creation/cglib/MockitoNamingPolicy.java   |  4 ++--
- org/mockito/internal/creation/jmock/ClassImposterizer.java     | 10 +++++-----
- org/mockito/internal/creation/jmock/SerializableNoOp.java      |  4 ++--
- org/mockito/internal/util/MockUtil.java                        |  3 ++-
- 10 files changed, 24 insertions(+), 23 deletions(-)
-
-diff --git a/org/mockito/internal/creation/CglibMockMaker.java b/org/mockito/internal/creation/CglibMockMaker.java
-index 7692b84..7509dd5 100644
---- a/org/mockito/internal/creation/CglibMockMaker.java
-+++ b/org/mockito/internal/creation/CglibMockMaker.java
+--- a/src/org/mockito/internal/creation/cglib/CglibMockMaker.java
++++ b/src/org/mockito/internal/creation/cglib/CglibMockMaker.java
 @@ -4,8 +4,8 @@
   */
- package org.mockito.internal.creation;
+ package org.mockito.internal.creation.cglib;
  
 -import org.mockito.cglib.proxy.Callback;
 -import org.mockito.cglib.proxy.Factory;
@@ -33,181 +13,191 @@ index 7692b84..7509dd5 100644
 +import net.sf.cglib.proxy.Factory;
  import org.mockito.exceptions.base.MockitoException;
  import org.mockito.internal.InternalMockHandler;
- import org.mockito.invocation.MockHandler;
-diff --git a/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java b/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java
-index bb2477d..9410a29 100644
---- a/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java
-+++ b/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java
+ import org.mockito.internal.creation.instance.InstantiatorProvider;
+--- a/src/org/mockito/internal/creation/cglib/DelegatingMockitoMethodProxy.java
++++ b/src/org/mockito/internal/creation/cglib/DelegatingMockitoMethodProxy.java
 @@ -4,7 +4,7 @@
   */
- package org.mockito.internal.creation;
- 
--import org.mockito.cglib.proxy.MethodProxy;
-+import net.sf.cglib.proxy.MethodProxy;
- 
- public class DelegatingMockitoMethodProxy extends AbstractMockitoMethodProxy {
- 
-@@ -17,4 +17,4 @@ public class DelegatingMockitoMethodProxy extends AbstractMockitoMethodProxy {
-     public MethodProxy getMethodProxy() {
-         return methodProxy;
-     }
+ package org.mockito.internal.creation.cglib;
+ 
+-import org.mockito.cglib.proxy.MethodProxy;
++import net.sf.cglib.proxy.MethodProxy;
+ import org.mockito.internal.creation.util.MockitoMethodProxy;
+ 
+ class DelegatingMockitoMethodProxy implements MockitoMethodProxy {
+@@ -18,4 +18,4 @@
+     public Object invokeSuper(Object target, Object[] arguments) throws Throwable {
+         return methodProxy.invokeSuper(target, arguments);
+     }
 -}
 \ No newline at end of file
-+}
-diff --git a/org/mockito/internal/creation/MethodInterceptorFilter.java b/org/mockito/internal/creation/MethodInterceptorFilter.java
-index 00a91d8..c1f7cf4 100644
---- a/org/mockito/internal/creation/MethodInterceptorFilter.java
-+++ b/org/mockito/internal/creation/MethodInterceptorFilter.java
-@@ -8,8 +8,8 @@ package org.mockito.internal.creation;
- import java.io.Serializable;
- import java.lang.reflect.Method;
++}
+--- a/src/org/mockito/internal/creation/cglib/MethodInterceptorFilter.java
++++ b/src/org/mockito/internal/creation/cglib/MethodInterceptorFilter.java
+@@ -5,8 +5,8 @@
+ 
+ package org.mockito.internal.creation.cglib;
  
 -import org.mockito.cglib.proxy.MethodInterceptor;
 -import org.mockito.cglib.proxy.MethodProxy;
 +import net.sf.cglib.proxy.MethodInterceptor;
 +import net.sf.cglib.proxy.MethodProxy;
  import org.mockito.internal.InternalMockHandler;
- import org.mockito.invocation.Invocation;
- import org.mockito.invocation.MockHandler;
-@@ -72,4 +72,4 @@ public class MethodInterceptorFilter implements MethodInterceptor, Serializable
-             return new DelegatingMethod(method); 
+ import org.mockito.internal.creation.DelegatingMethod;
+ import org.mockito.internal.creation.util.MockitoMethodProxy;
+@@ -80,4 +80,4 @@
+             return new DelegatingMethod(method);
          }
      }
 -}
 \ No newline at end of file
 +}
-diff --git a/org/mockito/internal/creation/MockitoMethodProxy.java b/org/mockito/internal/creation/MockitoMethodProxy.java
-index 384ca61..2b6c3c3 100644
---- a/org/mockito/internal/creation/MockitoMethodProxy.java
-+++ b/org/mockito/internal/creation/MockitoMethodProxy.java
+--- a/src/org/mockito/internal/creation/cglib/SerializableMockitoMethodProxy.java
++++ b/src/org/mockito/internal/creation/cglib/SerializableMockitoMethodProxy.java
 @@ -4,7 +4,7 @@
   */
- package org.mockito.internal.creation;
- 
--import org.mockito.cglib.proxy.MethodProxy;
-+import net.sf.cglib.proxy.MethodProxy;
- 
- public interface MockitoMethodProxy {
- 
-@@ -12,4 +12,4 @@ public interface MockitoMethodProxy {
- 
-     MethodProxy getMethodProxy();
- 
+ package org.mockito.internal.creation.cglib;
+ 
+-import org.mockito.cglib.proxy.MethodProxy;
++import net.sf.cglib.proxy.MethodProxy;
+ import org.mockito.internal.creation.util.MockitoMethodProxy;
+ import org.mockito.internal.util.reflection.Whitebox;
+ 
+@@ -41,4 +41,4 @@
+     public Object invokeSuper(Object target, Object[] arguments) throws Throwable {
+         return getMethodProxy().invokeSuper(target, arguments);
+     }
 -}
 \ No newline at end of file
-+}
-diff --git a/org/mockito/internal/creation/SerializableMockitoMethodProxy.java b/org/mockito/internal/creation/SerializableMockitoMethodProxy.java
-index 0646083..5803330 100644
---- a/org/mockito/internal/creation/SerializableMockitoMethodProxy.java
-+++ b/org/mockito/internal/creation/SerializableMockitoMethodProxy.java
-@@ -6,7 +6,7 @@ package org.mockito.internal.creation;
- 
- import java.io.Serializable;
++}
+--- a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
++++ b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
+@@ -4,7 +4,7 @@
+  */
+ package org.mockito.internal.creation.cglib;
  
 -import org.mockito.cglib.proxy.MethodProxy;
 +import net.sf.cglib.proxy.MethodProxy;
- import org.mockito.internal.util.reflection.Whitebox;
  
- public class SerializableMockitoMethodProxy extends AbstractMockitoMethodProxy implements Serializable {
-@@ -34,4 +34,4 @@ public class SerializableMockitoMethodProxy extends AbstractMockitoMethodProxy i
-             methodProxy = MethodProxy.create(c1, c2, desc, name, superName);
-         return methodProxy;
-     }
--}
-\ No newline at end of file
-+}
-diff --git a/org/mockito/internal/creation/cglib/CGLIBHacker.java b/org/mockito/internal/creation/cglib/CGLIBHacker.java
-index e0ce914..1dcef65 100644
---- a/org/mockito/internal/creation/cglib/CGLIBHacker.java
-+++ b/org/mockito/internal/creation/cglib/CGLIBHacker.java
-@@ -8,7 +8,7 @@ import java.io.Serializable;
+ import java.io.Serializable;
  import java.lang.reflect.Field;
- 
- import org.mockito.internal.creation.MockitoMethodProxy;
--import org.mockito.cglib.proxy.MethodProxy;
-+import net.sf.cglib.proxy.MethodProxy;
- 
- public class CGLIBHacker implements Serializable {
- 
-@@ -43,4 +43,4 @@ public class CGLIBHacker implements Serializable {
+@@ -39,4 +39,4 @@
          }
          return cglibMethodProxyClass.getDeclaredField("createInfo");
      }
 -}
 \ No newline at end of file
 +}
-diff --git a/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java b/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
-index c646ccd..3a30620 100644
---- a/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
-+++ b/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
+--- a/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
++++ b/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
 @@ -4,7 +4,7 @@
-  */
+  */
  package org.mockito.internal.creation.cglib;
  
 -import org.mockito.cglib.core.DefaultNamingPolicy;
 +import net.sf.cglib.core.DefaultNamingPolicy;
  
- public class MockitoNamingPolicy extends DefaultNamingPolicy {
+ class MockitoNamingPolicy extends DefaultNamingPolicy {
      
-@@ -14,4 +14,4 @@ public class MockitoNamingPolicy extends DefaultNamingPolicy {
+@@ -14,4 +14,4 @@
      protected String getTag() {
          return "ByMockitoWithCGLIB";
      }
 -}
 \ No newline at end of file
 +}
-diff --git a/org/mockito/internal/creation/jmock/ClassImposterizer.java b/org/mockito/internal/creation/jmock/ClassImposterizer.java
-index ba4ddf1..bc0ed2d 100644
---- a/org/mockito/internal/creation/jmock/ClassImposterizer.java
-+++ b/org/mockito/internal/creation/jmock/ClassImposterizer.java
+--- a/src/org/mockito/internal/creation/cglib/ClassImposterizer.java
++++ b/src/org/mockito/internal/creation/cglib/ClassImposterizer.java
 @@ -4,10 +4,10 @@
   */
- package org.mockito.internal.creation.jmock;
- 
--import org.mockito.cglib.core.CodeGenerationException;
--import org.mockito.cglib.core.NamingPolicy;
--import org.mockito.cglib.core.Predicate;
--import org.mockito.cglib.proxy.*;
-+import net.sf.cglib.core.CodeGenerationException;
-+import net.sf.cglib.core.NamingPolicy;
-+import net.sf.cglib.core.Predicate;
-+import net.sf.cglib.proxy.*;
- import org.mockito.exceptions.base.MockitoException;
- import org.mockito.internal.configuration.GlobalConfiguration;
- import org.mockito.internal.creation.cglib.MockitoNamingPolicy;
-@@ -139,4 +139,4 @@ public class ClassImposterizer  {
-     
-     public static class ClassWithSuperclassToWorkAroundCglibBug {}
-     
+ package org.mockito.internal.creation.cglib;
+ 
+-import org.mockito.cglib.core.CodeGenerationException;
+-import org.mockito.cglib.core.NamingPolicy;
+-import org.mockito.cglib.core.Predicate;
+-import org.mockito.cglib.proxy.*;
++import net.sf.cglib.core.CodeGenerationException;
++import net.sf.cglib.core.NamingPolicy;
++import net.sf.cglib.core.Predicate;
++import net.sf.cglib.proxy.*;
+ import org.mockito.exceptions.base.MockitoException;
+ import org.mockito.internal.creation.instance.InstantationException;
+ import org.mockito.internal.creation.instance.Instantiator;
+@@ -157,4 +157,4 @@
+     
+     public static class ClassWithSuperclassToWorkAroundCglibBug {}
+     
 -}
 \ No newline at end of file
-+}
-diff --git a/org/mockito/internal/creation/jmock/SerializableNoOp.java b/org/mockito/internal/creation/jmock/SerializableNoOp.java
-index 2fa878b..9789d2e 100644
---- a/org/mockito/internal/creation/jmock/SerializableNoOp.java
-+++ b/org/mockito/internal/creation/jmock/SerializableNoOp.java
-@@ -6,8 +6,8 @@ package org.mockito.internal.creation.jmock;
- 
- import java.io.Serializable;
- 
--import org.mockito.cglib.proxy.Callback;
--import org.mockito.cglib.proxy.NoOp;
-+import net.sf.cglib.proxy.Callback;
-+import net.sf.cglib.proxy.NoOp;
- 
- public class SerializableNoOp implements NoOp, Serializable {
- 
-diff --git a/org/mockito/internal/util/MockUtil.java b/org/mockito/internal/util/MockUtil.java
-index 07dcaed..b109f39 100644
---- a/org/mockito/internal/util/MockUtil.java
-+++ b/org/mockito/internal/util/MockUtil.java
-@@ -3,7 +3,8 @@
-  * This program is made available under the terms of the MIT License.
++}
+--- a/src/org/mockito/internal/creation/cglib/SerializableNoOp.java
++++ b/src/org/mockito/internal/creation/cglib/SerializableNoOp.java
+@@ -4,8 +4,8 @@
   */
- package org.mockito.internal.util;
--
+ package org.mockito.internal.creation.cglib;
+ 
+-import org.mockito.cglib.proxy.Callback;
+-import org.mockito.cglib.proxy.NoOp;
 +import net.sf.cglib.proxy.Callback;
-+import net.sf.cglib.proxy.Factory;
- import org.mockito.exceptions.misusing.NotAMockException;
- import org.mockito.internal.InternalMockHandler;
- import org.mockito.internal.configuration.ClassPathLoader;
++import net.sf.cglib.proxy.NoOp;
+ 
+ import java.io.Serializable;
+ 
+--- a/build.gradle
++++ b/build.gradle
+@@ -55,6 +55,7 @@
+ dependencies {
+     provided "junit:junit:4.10"
+     compile "org.hamcrest:hamcrest-core:1.1", "org.objenesis:objenesis:2.1"
++    compile "cglib:cglib:debian"
+     compile fileTree('lib/repackaged') { exclude '*.txt'}
+ 
+     testCompile fileTree("lib/test")
+@@ -79,7 +80,6 @@
+ jar {
+     baseName = 'mockito-core'
+     from(sourceSets.main.allSource)
+-    with repackagedClasses
+     with licenseFiles
+ }
+ 
+@@ -104,7 +104,6 @@
+ task allJar(type: Jar) {
+     baseName = 'mockito-all'
+ 
+-    with repackagedClasses
+     with licenseFiles
+ 
+     //source files
+@@ -167,4 +166,4 @@
+ task ciBuild {
+     //validate the state of the project
+     dependsOn build, publishToMavenLocal, tasks.idea, tasks.eclipse
+-}
+\ No newline at end of file
++}
+--- a/build-ant.xml
++++ b/build-ant.xml
+@@ -7,7 +7,7 @@
+     <loadproperties srcfile="version.properties" />
+ 
+     <path id="ant.classpath">
+-        <fileset dir="lib/build" includes="*bnd*" />
++        <fileset dir="/usr/share/java" includes="*bnd*" />
+     </path>
+ 
+     <property name="jar.core.path" value="build/libs/mockito-core-${version}.jar"/>
+--- a/maven/mockito-core.pom
++++ b/maven/mockito-core.pom
+@@ -36,6 +36,11 @@
+             <artifactId>objenesis</artifactId>
+             <version>2.1</version>
+         </dependency>
++        <dependency>
++            <groupId>cglib</groupId>
++            <artifactId>cglib</artifactId>
++            <version>debian</version>
++        </dependency>
+     </dependencies>
+     
+ </project>
diff --git a/debian/patches/01-fix_FTBFS_with_hamcrest_interfaces.patch b/debian/patches/01-fix_FTBFS_with_hamcrest_interfaces.patch
index 3c95b89..3ae1fa5 100644
--- a/debian/patches/01-fix_FTBFS_with_hamcrest_interfaces.patch
+++ b/debian/patches/01-fix_FTBFS_with_hamcrest_interfaces.patch
@@ -1,28 +1,18 @@
-From: David Paleino <dapal at debian.org>
-Date: Sat, 15 Jun 2013 12:12:42 +0200
-Subject: 01 fix_FTBFS_with_hamcrest_interfaces
-
-Mockito fails to build from source with Debian's version of libhamcrest. This
-patch implements the missing interface.
-
-Bug: http://bugs.debian.org/661877
+Description: Mockito fails to build from source with Debian's version of libhamcrest.
+ This patch implements the missing interface.
+Author: David Paleino <dapal at debian.org>
+Bug-Debian: https://bugs.debian.org/661877
 Forwarded: not-needed
----
- org/mockito/internal/matchers/LocalizedMatcher.java | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/org/mockito/internal/matchers/LocalizedMatcher.java b/org/mockito/internal/matchers/LocalizedMatcher.java
-index 4021ce0..b0b4747 100644
---- a/org/mockito/internal/matchers/LocalizedMatcher.java
-+++ b/org/mockito/internal/matchers/LocalizedMatcher.java
-@@ -34,6 +34,10 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation,
-         actualMatcher.describeTo(description);
+--- a/src/org/mockito/internal/matchers/LocalizedMatcher.java
++++ b/src/org/mockito/internal/matchers/LocalizedMatcher.java
+@@ -68,4 +68,8 @@
+     public Matcher getActualMatcher() {
+         return actualMatcher;
      }
- 
+-}
+\ No newline at end of file
++
 +    public void describeMismatch(Object item, Description description) {
 +        actualMatcher.describeMismatch(item, description);
 +    }
-+
-     public Location getLocation() {
-         return location;
-     }
++}
diff --git a/debian/patches/02-disable-online-tests.patch b/debian/patches/02-disable-online-tests.patch
new file mode 100644
index 0000000..a537745
--- /dev/null
+++ b/debian/patches/02-disable-online-tests.patch
@@ -0,0 +1,18 @@
+Description: Disable the tests requiring a network connection
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/buildSrc/src/test/groovy/testutil/OfflineChecker.groovy
++++ b/buildSrc/src/test/groovy/testutil/OfflineChecker.groovy
+@@ -7,11 +7,6 @@
+     }
+ 
+     static isOffline(String testUrl) {
+-        try {
+-            new URL(testUrl).withInputStream {}
+-            return false
+-        } catch (Exception ignored) {
+-            return true
+-        }
++        return true;
+     }
+ }
diff --git a/debian/patches/03-ignore-cobertura-plugin.patch b/debian/patches/03-ignore-cobertura-plugin.patch
new file mode 100644
index 0000000..16f4f3d
--- /dev/null
+++ b/debian/patches/03-ignore-cobertura-plugin.patch
@@ -0,0 +1,13 @@
+Description: Ignore the code coverage plugin
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/build.gradle
++++ b/build.gradle
+@@ -15,7 +15,6 @@
+ 
+ apply from: 'gradle/version.gradle'
+ apply from: "gradle/ide.gradle"
+-apply from: 'gradle/coverage.gradle'
+ 
+ allprojects {
+     repositories {
diff --git a/debian/patches/04-gradle-compatibility.patch b/debian/patches/04-gradle-compatibility.patch
new file mode 100644
index 0000000..31ba275
--- /dev/null
+++ b/debian/patches/04-gradle-compatibility.patch
@@ -0,0 +1,14 @@
+Description: Fixes the compatibility with the current version of Gradle
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/build.gradle
++++ b/build.gradle
+@@ -22,6 +22,8 @@
+     }
+ }
+ 
++apply plugin: 'java'
++
+ group = 'org.mockito'
+ description = 'Core API and implementation.'
+ sourceCompatibility = 1.5
diff --git a/debian/patches/05-ignore-release-tasks.patch b/debian/patches/05-ignore-release-tasks.patch
new file mode 100644
index 0000000..015c5cc
--- /dev/null
+++ b/debian/patches/05-ignore-release-tasks.patch
@@ -0,0 +1,31 @@
+Description: Ignore the release tasks
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/gradle/release.gradle
++++ b/gradle/release.gradle
+@@ -9,8 +9,6 @@
+ 
+ assert project == rootProject
+ 
+-apply from: rootProject.file("gradle/publish.gradle")
+-
+ apply plugin: 'release-notes'
+ apply plugin: 'release'
+ 
+@@ -182,4 +180,4 @@
+   -new commits removal (git reset --hard) on all affected branches
+ -clean up after release:
+  -?
+- */
+\ No newline at end of file
++ */
+--- a/build.gradle
++++ b/build.gradle
+@@ -157,7 +157,6 @@
+     }
+ }
+ 
+-apply from: 'gradle/release.gradle'
+ apply from: "gradle/pom.gradle"
+ 
+ task wrapper(type: Wrapper) {
diff --git a/debian/patches/series b/debian/patches/series
index 5a59db4..1b07717 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,6 @@
 00-use_system_libraries.patch
 01-fix_FTBFS_with_hamcrest_interfaces.patch
+02-disable-online-tests.patch
+03-ignore-cobertura-plugin.patch
+04-gradle-compatibility.patch
+05-ignore-release-tasks.patch
diff --git a/debian/pom.xml b/debian/pom.xml
deleted file mode 100644
index 0caa963..0000000
--- a/debian/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-    <groupId>org.mockito</groupId>
-    <artifactId>mockito-core</artifactId>
-    <version>1.9.5</version>
-    <name>Mockito</name>
-    <packaging>jar</packaging>
-    <url>http://www.mockito.org</url>
-    <description>Mock objects library for java</description>
-    <licenses>
-        <license>
-            <name>The MIT License</name>
-            <url>http://code.google.com/p/mockito/wiki/License</url>
-            <distribution>repo</distribution>
-        </license>
-    </licenses>
-    <scm>
-        <url>http://code.google.com/p/mockito/source/browse/</url>
-    </scm>
-    <developers>
-        <developer>
-            <id>szczepiq</id>
-            <name>Szczepan Faber</name>
-        </developer>
-    </developers>
-    <dependencies>
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-core</artifactId>
-            <version>1.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.objenesis</groupId>
-            <artifactId>objenesis</artifactId>
-            <version>1.0</version>        
-        </dependency>
-    </dependencies>
-    
-</project>
diff --git a/debian/rules b/debian/rules
index 3ce4fde..af634ce 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,54 +1,10 @@
 #!/usr/bin/make -f
-#export DH_VERBOSE=1
-export JAVA_HOME=/usr/lib/jvm/default-java
-export CLASSPATH=/usr/share/java/objenesis.jar:/usr/share/java/cglib.jar:/usr/share/java/hamcrest-core.jar:/usr/share/java/asm.jar:/usr/share/java/junit4.jar
-
-PKD  = $(abspath $(dir $(MAKEFILE_LIST)))
-PKG  = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
-VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s*([\d\.]+)}')
-DTYPE = +ds
 
 %:
-	dh $@ \
-		--with javahelper \
-		--with jh_maven_repo_helper
-
-override_jh_build:
-	jh_build mockito-core.jar org/
-
-override_dh_auto_clean:
-	dh_auto_clean
-	$(RM) $(CURDIR)/mockito-core.jar
-
-override_dh_builddeb:
-	dh_builddeb -- -Zxz
-
-.PHONY: get-orig-source
-## http://wiki.debian.org/onlyjob/get-orig-source
-get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
-	@
-
-$(PKG)-$(VER):
-	@echo "# Downloading..."
-	uscan --noconf --verbose --rename --repack --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
-	@echo "# Extracting..."
-	mkdir $(PKG)-$(VER)-PRE \
-	&& tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER)-PRE --strip-components 0 \
-	|| $(RM) -r $(PKG)-$(VER)-PRE
-	unzip $(PKG)-$(VER)-PRE/sources/mockito-core-$(VER)-sources.jar -d $(PKG)-$(VER)
-	@echo "# Cleaning-up..."
-	cd $(PKG)-$(VER) \
-	&& $(RM) -r -v \
-		org/mockito/cglib \
-		org/mockito/asm \
-		*.txt
-
-$(PKG)_$(VER)$(DTYPE).orig.tar.xz: $(PKG)-$(VER)
-	@echo "# Packing..."
-	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
-	| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
-	&& $(RM) -r "$(PKG)-$(VER)" "$(PKG)-$(VER)-PRE"
+	dh $@ --buildsystem=gradle --with maven-repo-helper
 
+override_dh_auto_build:
+	dh_auto_build -- jar javadoc -PantCommand=/usr/bin/ant
 
-get-orig-pom:
-	wget -O debian/pom.xml http://mirrors.ibiblio.org/pub/mirrors/maven2/org/mockito/mockito-core/$(VER)/mockito-core-$(VER).pom
+get-orig-source:
+	uscan --download-current-version --rename --repack --compression xz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/mockito.git



More information about the pkg-java-commits mailing list