[pkg-java] r14488 - in trunk/plexus-classworlds/debian: . patches

Torsten Werner twerner at alioth.debian.org
Thu Aug 25 14:39:11 UTC 2011


Author: twerner
Date: 2011-08-25 14:39:10 +0000 (Thu, 25 Aug 2011)
New Revision: 14488

Added:
   trunk/plexus-classworlds/debian/README.source
   trunk/plexus-classworlds/debian/TODO
   trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.doc-base.api
   trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.install
   trunk/plexus-classworlds/debian/maven.cleanIgnoreRules
   trunk/plexus-classworlds/debian/maven.ignoreRules
   trunk/plexus-classworlds/debian/maven.properties
   trunk/plexus-classworlds/debian/maven.publishedRules
   trunk/plexus-classworlds/debian/patches/
   trunk/plexus-classworlds/debian/patches/0001-fix-some-artifacts-in-pom.xml.patch
   trunk/plexus-classworlds/debian/patches/series
Removed:
   trunk/plexus-classworlds/debian/build.xml
   trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.doc-base
Modified:
   trunk/plexus-classworlds/debian/changelog
   trunk/plexus-classworlds/debian/control
   trunk/plexus-classworlds/debian/libplexus-classworlds-java.poms
   trunk/plexus-classworlds/debian/maven.rules
   trunk/plexus-classworlds/debian/orig-tar.sh
   trunk/plexus-classworlds/debian/rules
   trunk/plexus-classworlds/debian/watch
Log:
Use Maven to build the package.

Added: trunk/plexus-classworlds/debian/README.source
===================================================================
--- trunk/plexus-classworlds/debian/README.source	                        (rev 0)
+++ trunk/plexus-classworlds/debian/README.source	2011-08-25 14:39:10 UTC (rev 14488)
@@ -0,0 +1,9 @@
+Information about plexus-classworlds
+------------------------------
+
+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.

Added: trunk/plexus-classworlds/debian/TODO
===================================================================
--- trunk/plexus-classworlds/debian/TODO	                        (rev 0)
+++ trunk/plexus-classworlds/debian/TODO	2011-08-25 14:39:10 UTC (rev 14488)
@@ -0,0 +1 @@
+- fix test failures and errors

Deleted: trunk/plexus-classworlds/debian/build.xml
===================================================================
--- trunk/plexus-classworlds/debian/build.xml	2011-08-25 14:19:21 UTC (rev 14487)
+++ trunk/plexus-classworlds/debian/build.xml	2011-08-25 14:39:10 UTC (rev 14488)
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-      This build.xml file was written for the Debian build of plexus-classworlds.
-      This file copyright (c) Paul Cager <paul-debian at home.paulcager.org>
-
-        This software and documentation is provided "as is," and
-        the copyright holders and contributing author(s) make no
-        representations or warranties, express or implied, including
-        but not limited to, warranties of merchantability or fitness
-        for any particular purpose or that the use of the software or
-        documentation will not infringe any third party patents,
-        copyrights, trademarks or other rights. 
-
-        The copyright holders and contributing author(s) will not be
-        liable for any direct, indirect, special or consequential damages
-        arising out of any use of the software or documentation, even if
-        advised of the possibility of such damage.
-
-        Permission is hereby granted to use, copy, modify, and distribute
-        this source code, or portions hereof, documentation and executables,
-        for any purpose, without fee, subject to the following restrictions:
-
-        1. The origin of this source code must not be misrepresented.
-        2. Altered versions must be plainly marked as such and must
-           not be misrepresented as being the original source.
-        3. This Copyright notice may not be removed or altered from any
-           source or altered source distribution.
--->
-
-<project name="plexus-classworlds" default="package" basedir="..">
-
-<target name="package" depends="jar,javadoc"/>
-
-<target name="init">
-	<property name="src.dir" value="src"/>
-	<property name="build.dir" value="build"/>
-	<property name="jar" value="${build.dir}/${package}-${version}.jar"/>
-	<property name="javadoc.dir" value="${build.dir}/doc/api"/>
-</target>
-
-<target name="compile" depends="init">
-	<mkdir dir="${build.dir}"/>
-	<javac srcdir="${src.dir}/main"
-		destdir="${build.dir}"
-		includes="**/*.java"
-		debug="on"
-	/>
-</target>
-
-<target name="jar" depends="compile">
-	<delete file="${jar}"/>
-
-	<jar jarfile="${jar}"
-		basedir="${build.dir}"
-		includes="**/*.class,**/*.properties"
-	/>
-</target>
-
-<target name="javadoc" depends="init">
-	<mkdir dir="${javadoc.dir}"/>
-	<javadoc packagenames="org.codehaus.plexus.*"
-		sourcepath="${src.dir}/main/java"
-		destdir="${javadoc.dir}"
-		author="true"
-		version="true"
-		windowtitle="${package} API"
-		doctitle="${package} - ${version}"
-	/>
-</target>
-
-<target name="clean" depends="init">
-	<delete dir="${build.dir}"/>
-</target>
-</project>

Modified: trunk/plexus-classworlds/debian/changelog
===================================================================
--- trunk/plexus-classworlds/debian/changelog	2011-08-25 14:19:21 UTC (rev 14487)
+++ trunk/plexus-classworlds/debian/changelog	2011-08-25 14:39:10 UTC (rev 14488)
@@ -7,8 +7,9 @@
   * Switch to debhelper level 7.
   * Update Standards-Version 3.9.1.
   * Replace Depends: classpath-doc by default-jdk-doc.
+  * Use Maven to build the package.
 
- -- Torsten Werner <twerner at debian.org>  Thu, 25 Aug 2011 16:11:38 +0200
+ -- Torsten Werner <twerner at debian.org>  Thu, 25 Aug 2011 16:24:58 +0200
 
 plexus-classworlds (1.5.0-2) unstable; urgency=low
 

Modified: trunk/plexus-classworlds/debian/control
===================================================================
--- trunk/plexus-classworlds/debian/control	2011-08-25 14:19:21 UTC (rev 14487)
+++ trunk/plexus-classworlds/debian/control	2011-08-25 14:39:10 UTC (rev 14488)
@@ -3,9 +3,9 @@
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Ludovic Claude <ludovic.claude at laposte.net>
-Build-Depends-Indep: maven-repo-helper, ant, ant-optional, 
- libxalan2-java
-Build-Depends: debhelper (>= 7), cdbs (>= 0.4.5.3), default-jdk
+Build-Depends: debhelper (>= 7), cdbs, default-jdk, maven-debian-helper (>= 1.4)
+Build-Depends-Indep: libmaven-dependency-plugin-java, junit, default-jdk-doc,
+ libmaven-javadoc-plugin-java, ant, libcommons-logging-java, libjaxp1.3-java
 Standards-Version: 3.9.1
 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/plexus-classworlds
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/plexus-classworlds/
@@ -13,8 +13,8 @@
 
 Package: libplexus-classworlds-java
 Architecture: all
-Section: java
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, ${maven:Depends}
+Recommends: ${maven:OptionalDepends}
 Suggests: libplexus-classworlds-java-doc
 Description: Class loading utilities for the Plexus framework
  The Plexus project provides a full software stack for creating and executing
@@ -39,7 +39,8 @@
 Package: libplexus-classworlds-java-doc
 Architecture: all
 Section: doc
-Depends: ${misc:Depends}, default-jdk-doc
+Depends: ${misc:Depends}, ${maven:DocDepends}
+Recommends: ${maven:DocOptionalDepends}
 Suggests: libplexus-classworlds-java
 Description: API Documentation for plexus-classworlds
  The Plexus project provides a full software stack for creating and executing

Deleted: trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.doc-base
===================================================================
--- trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.doc-base	2011-08-25 14:19:21 UTC (rev 14487)
+++ trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.doc-base	2011-08-25 14:39:10 UTC (rev 14488)
@@ -1,9 +0,0 @@
-Document: libplexus-classworlds-java
-Title: API Javadoc for plexus-classworlds
-Author: plexus-classworlds developers
-Abstract: This is the API Javadoc provided by the plexus-classworlds library.
-Section: Programming
-
-Format: HTML
-Index: /usr/share/doc/libplexus-classworlds-java/api/index.html
-Files: /usr/share/doc/libplexus-classworlds-java/api/*

Copied: trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.doc-base.api (from rev 14486, trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.doc-base)
===================================================================
--- trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.doc-base.api	                        (rev 0)
+++ trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.doc-base.api	2011-08-25 14:39:10 UTC (rev 14488)
@@ -0,0 +1,10 @@
+Document: libplexus-classworlds-java
+Title: API Javadoc for Plexus Classworlds
+Author: Plexus Classworlds developers
+Abstract: This is the API Javadoc provided for the
+ libplexus-classworlds-java library.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libplexus-classworlds-java/api/index.html
+Files: /usr/share/doc/libplexus-classworlds-java/api/*

Added: trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.install
===================================================================
--- trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.install	                        (rev 0)
+++ trunk/plexus-classworlds/debian/libplexus-classworlds-java-doc.install	2011-08-25 14:39:10 UTC (rev 14488)
@@ -0,0 +1,2 @@
+target/apidocs/* usr/share/doc/libplexus-classworlds-java/api
+

Modified: trunk/plexus-classworlds/debian/libplexus-classworlds-java.poms
===================================================================
--- trunk/plexus-classworlds/debian/libplexus-classworlds-java.poms	2011-08-25 14:19:21 UTC (rev 14487)
+++ trunk/plexus-classworlds/debian/libplexus-classworlds-java.poms	2011-08-25 14:39:10 UTC (rev 14488)
@@ -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

Added: trunk/plexus-classworlds/debian/maven.cleanIgnoreRules
===================================================================
--- trunk/plexus-classworlds/debian/maven.cleanIgnoreRules	                        (rev 0)
+++ trunk/plexus-classworlds/debian/maven.cleanIgnoreRules	2011-08-25 14:39:10 UTC (rev 14488)
@@ -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/
+

Added: trunk/plexus-classworlds/debian/maven.ignoreRules
===================================================================
--- trunk/plexus-classworlds/debian/maven.ignoreRules	                        (rev 0)
+++ trunk/plexus-classworlds/debian/maven.ignoreRules	2011-08-25 14:39:10 UTC (rev 14488)
@@ -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/
+

Added: trunk/plexus-classworlds/debian/maven.properties
===================================================================
--- trunk/plexus-classworlds/debian/maven.properties	                        (rev 0)
+++ trunk/plexus-classworlds/debian/maven.properties	2011-08-25 14:39:10 UTC (rev 14488)
@@ -0,0 +1,6 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
+maven.test.failure.ignore=true
+maven.test.error.ignore=true

Added: trunk/plexus-classworlds/debian/maven.publishedRules
===================================================================
--- trunk/plexus-classworlds/debian/maven.publishedRules	                        (rev 0)
+++ trunk/plexus-classworlds/debian/maven.publishedRules	2011-08-25 14:39:10 UTC (rev 14488)
@@ -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/
+

Modified: trunk/plexus-classworlds/debian/maven.rules
===================================================================
--- trunk/plexus-classworlds/debian/maven.rules	2011-08-25 14:19:21 UTC (rev 14487)
+++ trunk/plexus-classworlds/debian/maven.rules	2011-08-25 14:39:10 UTC (rev 14488)
@@ -1 +1,20 @@
-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/
+
+junit junit jar s/3\..*/3.x/ * *
+org.codehaus.plexus plexus-classworlds jar s/.*/debian/ * *

Modified: trunk/plexus-classworlds/debian/orig-tar.sh
===================================================================
--- trunk/plexus-classworlds/debian/orig-tar.sh	2011-08-25 14:19:21 UTC (rev 14487)
+++ trunk/plexus-classworlds/debian/orig-tar.sh	2011-08-25 14:39:10 UTC (rev 14488)
@@ -1,19 +1,18 @@
 #!/bin/sh -e
 
-TAR=../plexus-classworlds_$2.orig.tar.gz
-DIR=plexus-classworlds-$2
-TAG=$(echo plexus-classworlds-$2 | sed 's,~alpha,-alpha-,')
+VERSION=$2
+TAR=../plexus-classworlds_$VERSION.orig.tar.gz
+DIR=plexus-classworlds-$VERSION
+TAG=$(echo "plexus-classworlds-$VERSION" | sed -re's/~(alpha|beta)/-\1-/')
 
-svn export http://svn.codehaus.org/plexus/plexus-classworlds/tags/$TAG/ $DIR
+svn export http://svn.codehaus.org/plexus/plexus-classworlds/tags/${TAG}/ $DIR
 rm -f $DIR/classworlds-aj.zip
 rm -rf $DIR/lib
-tar -c -z -f $TAR $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
-

Added: trunk/plexus-classworlds/debian/patches/0001-fix-some-artifacts-in-pom.xml.patch
===================================================================
--- trunk/plexus-classworlds/debian/patches/0001-fix-some-artifacts-in-pom.xml.patch	                        (rev 0)
+++ trunk/plexus-classworlds/debian/patches/0001-fix-some-artifacts-in-pom.xml.patch	2011-08-25 14:39:10 UTC (rev 14488)
@@ -0,0 +1,37 @@
+From: Torsten Werner <twerner at debian.org>
+Date: Thu, 25 Aug 2011 16:32:54 +0200
+Subject: [PATCH] fix some artifacts in pom.xml
+
+---
+ pom.xml |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index b906267..8ebc06f 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -81,19 +81,19 @@
+             <configuration>
+                 <artifactItems>
+                   <artifactItem>
+-                    <groupId>ant</groupId>
++                    <groupId>org.apache.ant</groupId>
+                     <artifactId>ant</artifactId>
+-                    <version>1.6.5</version>
++                    <version>debian</version>
+                   </artifactItem>
+                   <artifactItem>
+                     <groupId>commons-logging</groupId>
+                     <artifactId>commons-logging</artifactId>
+-                    <version>1.0.3</version>
++                    <version>debian</version>
+                   </artifactItem>
+                   <artifactItem>
+                     <groupId>xml-apis</groupId>
+                     <artifactId>xml-apis</artifactId>
+-                    <version>1.3.02</version>
++                    <version>debian</version>
+                   </artifactItem>
+                 </artifactItems>
+                 <outputDirectory>${project.build.directory}/test-lib</outputDirectory>
+-- 

Added: trunk/plexus-classworlds/debian/patches/series
===================================================================
--- trunk/plexus-classworlds/debian/patches/series	                        (rev 0)
+++ trunk/plexus-classworlds/debian/patches/series	2011-08-25 14:39:10 UTC (rev 14488)
@@ -0,0 +1 @@
+0001-fix-some-artifacts-in-pom.xml.patch

Modified: trunk/plexus-classworlds/debian/rules
===================================================================
--- trunk/plexus-classworlds/debian/rules	2011-08-25 14:19:21 UTC (rev 14487)
+++ trunk/plexus-classworlds/debian/rules	2011-08-25 14:39:10 UTC (rev 14488)
@@ -1,29 +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_HOME)/lib/ant-launcher.jar $(ANT_HOME)/lib/ant-trax.jar xalan2
-DEB_ANT_BUILD_TARGET := package javadoc
-DEB_ANT_BUILDFILE    := debian/build.xml
-DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
-API_DOCS             := build/doc/api
+JAVA_HOME := /usr/lib/jvm/default-java
 
 get-orig-source:
 	uscan --download-version $(DEB_UPSTREAM_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
-
-makebuilddir/lib$(PACKAGE)-java-doc::
-	echo "$(API_DOCS) usr/share/doc/lib$(PACKAGE)-java" >debian/lib$(PACKAGE)-java-doc.install
-
-cleanbuilddir/lib$(PACKAGE)-java-doc::
-	cd debian && rm -f lib$(PACKAGE)-java-doc.install 
-
-clean::
-	-rm -rf debian/tmp

Modified: trunk/plexus-classworlds/debian/watch
===================================================================
--- trunk/plexus-classworlds/debian/watch	2011-08-25 14:19:21 UTC (rev 14487)
+++ trunk/plexus-classworlds/debian/watch	2011-08-25 14:39:10 UTC (rev 14488)
@@ -1,4 +1,4 @@
 version=3
-http://svn.codehaus.org/plexus/plexus-classworlds/tags/ \
-  plexus-classworlds-(.*)/ debian debian/orig-tar.sh
-
+opts="uversionmangle=s/-(alpha|beta)-/~$1/" \
+  http://svn.codehaus.org/plexus/plexus-classworlds/tags/ \
+  plexus-classworlds-(\d.*)/ debian debian/orig-tar.sh




More information about the pkg-java-commits mailing list