[plexus-interpolation] 11/14: * Use Maven to build the package. * Add a documentation package. * Add a patch to support junit tests.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Jul 8 22:38:22 UTC 2015


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

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

commit 68204dffc91bb5b011c168514a889b7816ba9aaa
Author: Torsten Werner <twerner at debian.org>
Date:   Sun Aug 28 20:12:25 2011 +0000

    * Use Maven to build the package.
    * Add a documentation package.
    * Add a patch to support junit tests.
---
 debian/README.source                               |  9 +++++
 debian/build.properties                            |  2 --
 debian/changelog                                   |  6 ++--
 debian/control                                     | 39 ++++++++++++++++++++--
 .../libplexus-interpolation-java-doc.doc-base.api  | 10 ++++++
 debian/libplexus-interpolation-java-doc.install    |  2 ++
 debian/libplexus-interpolation-java.poms           | 27 ++++++++++++++-
 debian/maven.cleanIgnoreRules                      | 17 ++++++++++
 debian/maven.ignoreRules                           | 16 +++++++++
 debian/maven.properties                            |  4 +++
 debian/maven.publishedRules                        | 19 +++++++++++
 debian/maven.rules                                 | 19 ++++++++++-
 debian/orig-tar.sh                                 | 14 ++++----
 .../patches/0001-add-test-dependency-junit.patch   | 29 ++++++++++++++++
 debian/patches/series                              |  1 +
 debian/rules                                       | 20 ++---------
 debian/watch                                       |  5 +--
 17 files changed, 204 insertions(+), 35 deletions(-)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..8294e06
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,9 @@
+Information about plexus-interpolation
+------------------------------
+
+This package was debianized using the mh_make command
+from the maven-debian-helper package.
+
+The build system uses Maven but prevents it from downloading
+anything from the Internet, making the build compliant with
+the Debian policy.
diff --git a/debian/build.properties b/debian/build.properties
deleted file mode 100644
index e2ae10b..0000000
--- a/debian/build.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-javadoc.dir=build/api
-maven.test.skip=true
diff --git a/debian/changelog b/debian/changelog
index 5277bfe..7f84738 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,14 @@
 plexus-interpolation (1.11-3) unstable; urgency=low
 
-  UNRELEASED
   * Switch to source format 3.0.
   * Switch to debhelper level 7.
   * Change Build-Depends: default-jdk-builddep to default-jdk.
   * Update Standards-Version: 3.9.1.
+  * Use Maven to build the package.
+  * Add a documentation package.
+  * Add a patch to support junit tests.
 
- -- Torsten Werner <twerner at debian.org>  Sun, 28 Aug 2011 18:18:23 +0200
+ -- Torsten Werner <twerner at debian.org>  Sun, 28 Aug 2011 21:57:38 +0200
 
 plexus-interpolation (1.11-2) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index e793514..1276876 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,8 @@ Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Torsten Werner <twerner at debian.org>, Ludovic Claude <ludovic.claude at laposte.net>
-Build-Depends: debhelper (>= 7), cdbs (>= 0.4.5.3), default-jdk
-Build-Depends-Indep: maven-repo-helper, maven-ant-helper (>> 4), ant, ant-optional 
+Build-Depends: debhelper (>= 7), cdbs, default-jdk, maven-debian-helper (>= 1.4)
+Build-Depends-Indep: default-jdk-doc, libmaven-javadoc-plugin-java
 Standards-Version: 3.9.1
 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/plexus-interpolation
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/plexus-interpolation/
@@ -12,7 +12,9 @@ Homepage: http://plexus.codehaus.org/plexus-components/plexus-interpolation/
 
 Package: libplexus-interpolation-java
 Architecture: all
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, ${maven:Depends}
+Recommends: ${maven:OptionalDepends}
+Suggests: libplexus-interpolation-java-doc
 Description: Plexus Interpolation API
  The Plexus project provides a full software stack for creating and executing
  software projects. Based on the Plexus container, the applications can
@@ -35,3 +37,34 @@ Description: Plexus Interpolation API
  Plexus interpolator is focused on providing a more modular, flexible
  interpolation framework for the expression language style commonly seen in
  Maven, Plexus, and other related projects.
+
+Package: libplexus-interpolation-java-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}, ${maven:DocDepends}
+Recommends: ${maven:DocOptionalDepends}
+Suggests: libplexus-interpolation-java
+Description: Documentation for Plexus Interpolation API
+ The Plexus project provides a full software stack for creating and executing
+ software projects. Based on the Plexus container, the applications can
+ utilise component-oriented programming to build modular, reusable components
+ that can easily be assembled and reused.
+ .
+ While Plexus is similar to other inversion-of-control (IoC) or dependency
+ injection frameworks such as the Spring Framework, it is a full-fledged
+ container that supports many more features such as:
+ .
+     * Component lifecycles
+     * Component instantiation strategies
+     * Nested containers
+     * Component configuration
+     * Auto-wiring
+     * Component dependencies, and
+     * Various dependency injection techniques including constructor injection,
+       setter injection, and private field injection. 
+ .
+ Plexus interpolator is focused on providing a more modular, flexible
+ interpolation framework for the expression language style commonly seen in
+ Maven, Plexus, and other related projects.
+ .
+ This package contains the API documentation of libplexus-interpolation-java.
diff --git a/debian/libplexus-interpolation-java-doc.doc-base.api b/debian/libplexus-interpolation-java-doc.doc-base.api
new file mode 100644
index 0000000..1b19ae7
--- /dev/null
+++ b/debian/libplexus-interpolation-java-doc.doc-base.api
@@ -0,0 +1,10 @@
+Document: libplexus-interpolation-java
+Title: API Javadoc for Plexus Interpolation API
+Author: Plexus Interpolation API developers
+Abstract: This is the API Javadoc provided for the
+ libplexus-interpolation-java library.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libplexus-interpolation-java/api/index.html
+Files: /usr/share/doc/libplexus-interpolation-java/api/*
diff --git a/debian/libplexus-interpolation-java-doc.install b/debian/libplexus-interpolation-java-doc.install
new file mode 100644
index 0000000..29d4703
--- /dev/null
+++ b/debian/libplexus-interpolation-java-doc.install
@@ -0,0 +1,2 @@
+target/apidocs/* usr/share/doc/libplexus-interpolation-java/api
+
diff --git a/debian/libplexus-interpolation-java.poms b/debian/libplexus-interpolation-java.poms
index 43e746b..31a0ccf 100644
--- a/debian/libplexus-interpolation-java.poms
+++ b/debian/libplexus-interpolation-java.poms
@@ -1 +1,26 @@
-pom.xml --no-parent
+# 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 or
+#   --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
+#   --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.
+#   --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+#   --ignore-pom: don't install the POM with mh_install or mh_installpoms. To use with POM files that are created
+#     temporarily for certain artifacts such as Javadoc jars.
+#
+pom.xml --no-parent --has-package-version
diff --git a/debian/maven.cleanIgnoreRules b/debian/maven.cleanIgnoreRules
new file mode 100644
index 0000000..b47b61d
--- /dev/null
+++ b/debian/maven.cleanIgnoreRules
@@ -0,0 +1,17 @@
+# Maven clean ignore rules - ignore some Maven dependencies and plugins
+# during the clean phase of a Maven build
+# Format of this file is:
+# [group] [artifact] [type] [version] [classifier] [scope]
+# where each element can be either
+# - the exact string, for example org.apache for the group, or 3.1
+#   for the version. In this case, the element is simply matched
+#   and left as it is
+# - * (the star character, alone). In this case, anything will
+#   match and be left as it is. For example, using * on the
+#  position of the artifact field will match any artifact id
+# All elements much match before a rule can be applied
+# Example rule: match jar with groupid= junit, artifactid= junit
+# and version starting with 3., this dependency is then removed
+# from the POM before mvn clean is called
+#   junit junit jar s/3\\..*/3.x/
+
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..0088a40
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,16 @@
+# Maven ignore rules - ignore some Maven dependencies and plugins
+# Format of this file is:
+# [group] [artifact] [type] [version] [classifier] [scope]
+# where each element can be either
+# - the exact string, for example org.apache for the group, or 3.1
+#   for the version. In this case, the element is simply matched
+#   and left as it is
+# - * (the star character, alone). In this case, anything will
+#   match and be left as it is. For example, using * on the
+#  position of the artifact field will match any artifact id
+# All elements much match before a rule can be applied
+# Example rule: match jar with groupid= junit, artifactid= junit
+# and version starting with 3., this dependency is then removed
+# from the POM
+#   junit junit jar s/3\\..*/3.x/
+
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..7c29bd7
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,4 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
diff --git a/debian/maven.publishedRules b/debian/maven.publishedRules
new file mode 100644
index 0000000..822f087
--- /dev/null
+++ b/debian/maven.publishedRules
@@ -0,0 +1,19 @@
+# Maven published rules - additional rules to publish, to help
+# the packaging work of Debian maintainers using mh_make
+# Format of this file is:
+# [group] [artifact] [type] [version] [classifier] [scope]
+# where each element can be either
+# - the exact string, for example org.apache for the group, or 3.1
+#   for the version. In this case, the element is simply matched
+#   and left as it is
+# - * (the star character, alone). In this case, anything will
+#   match and be left as it is. For example, using * on the
+#  position of the artifact field will match any artifact id
+# - a regular expression of the form s/match/replace/
+#   in this case, elements that match are transformed using
+#   the regex rule.
+# All elements much match before a rule can be applied
+# Example rule: match jar with groupid= junit, artifactid= junit
+# and version starting with 3., replacing the version with 3.x
+#   junit junit jar s/3\\..*/3.x/
+
diff --git a/debian/maven.rules b/debian/maven.rules
index 8486979..960a057 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -1,2 +1,19 @@
-junit junit jar s/3\..*/3.x/
+# Maven rules - transform Maven dependencies and plugins
+# Format of this file is:
+# [group] [artifact] [type] [version] [classifier] [scope]
+# where each element can be either
+# - the exact string, for example org.apache for the group, or 3.1
+#   for the version. In this case, the element is simply matched
+#   and left as it is
+# - * (the star character, alone). In this case, anything will
+#   match and be left as it is. For example, using * on the
+#  position of the artifact field will match any artifact id
+# - a regular expression of the form s/match/replace/
+#   in this case, elements that match are transformed using
+#   the regex rule.
+# All elements much match before a rule can be applied
+# Example rule: match jar with groupid= junit, artifactid= junit
+# and version starting with 3., replacing the version with 3.x
 
+junit junit jar s/3\..*/3.x/
+org.codehaus.plexus plexus-interpolation jar s/.*/debian/ * *
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
index 3b4de7f..ba4ed7f 100755
--- a/debian/orig-tar.sh
+++ b/debian/orig-tar.sh
@@ -1,16 +1,16 @@
 #!/bin/sh -e
 
-TAR=../plexus-interpolation_$2.orig.tar.gz
-DIR=plexus-interpolation-$2
-TAG=plexus-interpolation-$2
+VERSION=$2
+TAR=../plexus-interpolation_$VERSION.orig.tar.gz
+DIR=plexus-interpolation-$VERSION
+TAG=$(echo "plexus-interpolation-$VERSION" | sed -re's/~(alpha|beta)/-\1-/')
 
-svn export http://svn.codehaus.org/plexus/plexus-components/tags/$TAG $DIR
-tar -c -z -f $TAR $DIR
+svn export http://svn.codehaus.org/plexus/plexus-components/tags/${TAG}/ $DIR
+GZIP=--best tar -c -z -f $TAR --exclude '*.jar' --exclude '*.class' $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"
+  mv $TAR $origDir && echo "moved $TAR to $origDir"
 fi
diff --git a/debian/patches/0001-add-test-dependency-junit.patch b/debian/patches/0001-add-test-dependency-junit.patch
new file mode 100644
index 0000000..df310a6
--- /dev/null
+++ b/debian/patches/0001-add-test-dependency-junit.patch
@@ -0,0 +1,29 @@
+From: Torsten Werner <twerner at debian.org>
+Date: Sun, 28 Aug 2011 21:56:54 +0200
+Subject: [PATCH] add test dependency junit
+
+---
+ pom.xml |   11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index 2af083d..0d811fe 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -17,4 +17,13 @@
+     <developerConnection>scm:svn:https://svn.codehaus.org/plexus/plexus-components/tags/plexus-interpolation-1.11</developerConnection>
+     <url>http://fisheye.codehaus.org/browse/plexus/plexus-components/tags/plexus-interpolation-1.11</url>
+   </scm>
+-</project>
+\ No newline at end of file
++
++  <dependencies>
++    <dependency>
++      <groupId>junit</groupId>
++      <artifactId>junit</artifactId>
++      <version>3.8.2</version>
++      <scope>test</scope>
++    </dependency>
++  </dependencies>
++</project>
+-- 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..46a4d5d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-add-test-dependency-junit.patch
diff --git a/debian/rules b/debian/rules
index 6e58322..b76c54a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,23 +1,9 @@
 #!/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/class/maven.mk
 
-PACKAGE              := $(DEB_SOURCE_PACKAGE)
-VERSION              := $(DEB_UPSTREAM_VERSION)
-JAVA_HOME            := /usr/lib/jvm/default-java
-DEB_JARS             := ant-nodeps
-DEB_ANT_BUILD_TARGET := package #javadoc
-DEB_ANT_BUILDFILE    := /usr/share/maven-ant-helper/maven-build.xml
-DEB_ANT_ARGS         := -Dbasedir=$(realpath .) -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
-API_DOCS             := build/api
+JAVA_HOME := /usr/lib/jvm/default-java
 
 get-orig-source:
-	uscan --download-version $(VERSION) --force-download --rename
-
-binary-post-install/lib$(PACKAGE)-java::
-	mh_installpoms -plib$(PACKAGE)-java
-	mh_installjar -plib$(PACKAGE)-java -l pom.xml build/$(PACKAGE)-$(VERSION).jar
-
-clean::
-	-rm -rf debian/tmp
+	uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
diff --git a/debian/watch b/debian/watch
index 1fbdade..b904a11 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,4 @@
 version=3
-http://svn.codehaus.org/plexus/plexus-components/tags/ \
-  plexus-interpolation-(.*)/ debian debian/orig-tar.sh
+opts="uversionmangle=s/-(alpha|beta)-/~$1/" \
+  http://svn.codehaus.org/plexus/plexus-components/tags/ \
+  plexus-interpolation-(\d.*)/ debian debian/orig-tar.sh

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



More information about the pkg-java-commits mailing list