[apache-mime4j] 03/07: Build with maven-debian-helper

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Nov 9 09:32:04 UTC 2015


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

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

commit 1caf2683a9cce45777bd9dc529476e1950e84778
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon Nov 9 09:51:55 2015 +0100

    Build with maven-debian-helper
---
 debian/changelog                         |  2 +-
 debian/control                           | 12 ++++-----
 debian/libapache-mime4j-java-doc.install |  2 +-
 debian/libapache-mime4j-java.poms        | 41 +++++++++++++++++++++++-----
 debian/maven.ignoreRules                 | 14 ++++++----
 debian/maven.rules                       |  8 +++---
 debian/rules                             | 46 ++------------------------------
 7 files changed, 56 insertions(+), 69 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ee8d9e5..156e9cc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
 apache-mime4j (0.7.2-4) UNRELEASED; urgency=medium
 
+  * Build with maven-debian-helper (should improve the reproducibility)
   * Removed the dependency on maven-assembly-plugin (Closes: #804458)
   * No longer build and install the benchmark module
   * Install the javadoc under the /usr/share/doc/libapache-mime4j-java/api
     directory instead of /usr/share/libapache-mime4j-java-doc
-  * Removed the explicit build dependencies on maven2 and maven-repo-helper
   * Standards-Version updated to 3.9.6 (no changes)
 
  -- Emmanuel Bourg <ebourg at apache.org>  Sun, 08 Nov 2015 22:57:09 +0100
diff --git a/debian/control b/debian/control
index 9bb139f..af1ea05 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,8 @@ Build-Depends:
  , maven-debian-helper
  , javahelper
 Build-Depends-Indep:
- libmaven-javadoc-plugin-java
+ libmaven-install-plugin-java
+ , libmaven-javadoc-plugin-java
  , libjavacc-maven-plugin-java
  , junit
  , liblog4j1.2-java
@@ -21,10 +22,8 @@ Homepage: http://james.apache.org/mime4j/
 
 Package: libapache-mime4j-java
 Architecture: all
-Depends:
- ${misc:Depends}
- , ${java:Depends}
-Recommends: ${java:Recommends}
+Depends: ${misc:Depends}, ${maven:Depends}
+Suggests: ${maven:OptionalDepends}
 Description: MIME and RFC822 parser for Java
  mime4j provides a parser, MimeStreamParser, for e-mail message streams in
  plain rfc822 and MIME format. The parser uses a callback mechanism to report
@@ -36,8 +35,7 @@ Description: MIME and RFC822 parser for Java
 Package: libapache-mime4j-java-doc
 Section: doc
 Architecture: all
-Depends:
- ${misc:Depends}
+Depends: ${misc:Depends}
 Description: MIME and RFC822 parser for Java - documentation
  mime4j provides a parser, MimeStreamParser, for e-mail message streams in
  plain rfc822 and MIME format. The parser uses a callback mechanism to report
diff --git a/debian/libapache-mime4j-java-doc.install b/debian/libapache-mime4j-java-doc.install
index 18706dd..a8ce61f 100644
--- a/debian/libapache-mime4j-java-doc.install
+++ b/debian/libapache-mime4j-java-doc.install
@@ -1 +1 @@
-apidocs/		/usr/share/doc/libapache-mime4j-java/api
+target/site/apidocs/*		/usr/share/doc/libapache-mime4j-java/api/
diff --git a/debian/libapache-mime4j-java.poms b/debian/libapache-mime4j-java.poms
index d562924..d8bd083 100644
--- a/debian/libapache-mime4j-java.poms
+++ b/debian/libapache-mime4j-java.poms
@@ -1,7 +1,34 @@
-pom.xml --no-parent
-core/pom.xml
-dom/pom.xml
-storage/pom.xml
-benchmark/pom.xml
-examples/pom.xml
-assemble/pom.xml
+# 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]
+#
+pom.xml --no-parent --has-package-version
+core/pom.xml --has-package-version
+dom/pom.xml --has-package-version
+storage/pom.xml --has-package-version
+benchmark/pom.xml --ignore
+examples/pom.xml --ignore
+assemble/pom.xml --ignore
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index 71d91a8..6f2d188 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -1,5 +1,9 @@
-*	apache-rat-plugin
-*       maven-assembly-plugin
-*	maven-remote-resources-plugin
-*	maven-source-plugin
-*	maven-bundle-plugin
+
+org.apache.james apache-mime4j-benchmark jar * * *
+org.apache.james apache-mime4j-examples jar * * *
+org.apache.james apache-mime4j pom * * *
+org.apache.rat apache-rat-plugin * * * *
+org.apache.maven.plugins maven-assembly-plugin * * * *
+org.apache.felix maven-bundle-plugin * * * *
+org.apache.maven.plugins maven-remote-resources-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
diff --git a/debian/maven.rules b/debian/maven.rules
index 4cad4d1..2d0ab1f 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -1,4 +1,4 @@
-*	javacc-maven-plugin		*	s/2\..*/2.6/
-*	maven-javadoc-plugin	*	s/2\..*/2.6.1/
-*	log4j					*	s/1\.2\..*/1.2.x/
-*	junit					*	s/3\..*/3.x/
+
+junit junit jar s/3\..*/3.x/ * *
+log4j log4j * s/1\.2\..*/1.2.x/ * *
+org.apache.james apache-mime4j-core test-jar * * *
diff --git a/debian/rules b/debian/rules
index 514895c..3702734 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,55 +1,13 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-UPVER=$(shell dpkg-parsechangelog | grep ^Version | cut -d' ' -f2 | cut -d- -f1)
-
-SKIPTEST=false
-ifneq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
-	SKIPTEST=true
-endif
 
 %:
-	dh $@ \
-		--with javahelper
+	dh $@ --buildsystem=maven --with javahelper
 
 override_dh_installchangelogs:
 	dh_installchangelogs RELEASE_NOTES.txt
 
 override_dh_auto_build:
-	# can't use mvn-debian because of libapache-mime4j-doc -- see
-	# mvn-debian's source
-	mh_patchpoms -plibapache-mime4j-java
-	mvn -o -s /etc/maven2/settings-debian.xml \
-	  -Dmaven.test.skip=$(SKIPTEST) package
-
-	# build javadoc
-	javadoc \
-		-d apidocs/ \
-		-sourcepath core/src/main/java/:storage/src/main/java/:dom/src/main/java/ \
-		-exclude org.apache.james.mime4j.field.address.parser:org.apache.james.mime4j.field.contentdisposition.parser:org.apache.james.mime4j.field.contenttype.parser:org.apache.james.mime4j.field.datetime.parser:org.apache.james.mime4j.field.language.parser:org.apache.james.mime4j.field.mimeversion.parser:org.apache.james.mime4j.field.structured.parser \
-		-subpackages org.apache.james.mime4j \
-			org.apache.james.mime4j.core \
-			org.apache.james.mime4j.dom \
-			org.apache.james.mime4j.storage
-            
-override_dh_auto_install:
-	dh_auto_install
-	mh_installpoms -plibapache-mime4j-java -e$(UPVER)
-	for i in core dom storage; do \
-	  mh_installjar -plibapache-mime4j-java -l $$i/pom.xml -j$(UPVER) -e$(UPVER) \
-	    $$i/target/apache-mime4j-$$i-debian.jar ; \
-	done
-
-	rm -rf $(CURDIR)/debian/libapache-mime4j-java/usr/share/maven-repo/org/apache/james/apache-mime4j-examples/
-
-override_dh_auto_clean:
-	dh_auto_clean
-	mh_clean
-	mh_unpatchpoms -plibapache-mime4j-java -v
-	-rm -rf target/ */target/ apidocs
+	dh_auto_build -- install javadoc:aggregate
 
 get-orig-source:
 	uscan --force-download --download-current-version --repack --rename

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



More information about the pkg-java-commits mailing list