[maven-debian-helper] 02/07: Do not run the tests when DEB_BUILD_OPTIONS=nocheck is specified (Closes: #737988)

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu Nov 12 18:21:20 UTC 2015


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

ebourg-guest pushed a commit to branch master
in repository maven-debian-helper.

commit 6c85598b612fa9f2ab50487f07fb1daf89297854
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Thu Nov 12 10:18:16 2015 +0100

    Do not run the tests when DEB_BUILD_OPTIONS=nocheck is specified (Closes: #737988)
---
 debian/changelog                 |  2 ++
 share/cdbs/1/class/maven-vars.mk |  2 +-
 share/cdbs/1/class/maven.mk      |  2 +-
 share/perl/maven.pm              | 12 ++++++++++++
 4 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0c42930..cd96a56 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 maven-debian-helper (1.6.14) UNRELEASED; urgency=medium
 
   * Ignore the 'maven clean' errors when building with debhelper
+  * Do not run the tests when DEB_BUILD_OPTIONS=nocheck is specified
+    (Closes: #737988)
 
  -- Emmanuel Bourg <ebourg at apache.org>  Thu, 12 Nov 2015 10:10:31 +0100
 
diff --git a/share/cdbs/1/class/maven-vars.mk b/share/cdbs/1/class/maven-vars.mk
index 45d3fb7..71f9f4b 100644
--- a/share/cdbs/1/class/maven-vars.mk
+++ b/share/cdbs/1/class/maven-vars.mk
@@ -104,7 +104,7 @@ DEB_MAVEN_INVOKE = cd $(DEB_BUILDDIR) && $(JAVACMD) -noverify -cp $(DEB_CLASSPAT
 # multiple targets for each step.
 DEB_MAVEN_BUILD_TARGET = package
 DEB_MAVEN_INSTALL_TARGET = org.debian.maven:debian-maven-plugin:$(MAVEN_DEBIAN_VERSION):install
-DEB_MAVEN_CHECK_TARGET =
+DEB_MAVEN_CHECK_TARGET = test
 DEB_MAVEN_CLEAN_TARGET = clean
 DEB_MAVEN_DOC_TARGET = javadoc:jar
 DEB_MAVEN_INSTALL_DOC_TARGET =
diff --git a/share/cdbs/1/class/maven.mk b/share/cdbs/1/class/maven.mk
index 3c06508..63b0a55 100644
--- a/share/cdbs/1/class/maven.mk
+++ b/share/cdbs/1/class/maven.mk
@@ -95,7 +95,7 @@ mvn-build:
 	if [ ! -f pom.xml.save ]; then \
 		$(MAKE) -f debian/rules patch-poms; \
 	fi
-	$(DEB_MAVEN_INVOKE) $(DEB_MAVEN_BUILD_TARGET)
+	$(DEB_MAVEN_INVOKE) $(DEB_MAVEN_BUILD_TARGET) -DskipTests
 # Placeholders to insert custom processing before and after a Maven build
 before-mvn-build::
 after-mvn-build::
diff --git a/share/perl/maven.pm b/share/perl/maven.pm
index acd40ca..7c20591 100644
--- a/share/perl/maven.pm
+++ b/share/perl/maven.pm
@@ -75,6 +75,18 @@ sub build {
 		}
 	}
 
+	push(@_, "-DskipTests");
+
+	$this->doit_in_builddir(@{$this->{maven_cmd}}, @_);
+}
+
+sub test {
+	my $this=shift;
+
+	if (!@_) {
+		push(@_, "test");
+	}
+
 	$this->doit_in_builddir(@{$this->{maven_cmd}}, @_);
 }
 

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



More information about the pkg-java-commits mailing list