[classworlds] 07/24: * Add Maven support

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri Jul 21 14:23:55 UTC 2017


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

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

commit 4664eb4ea5b8ec2063a0ea9560a0eefc853bb410
Author: Ludovic Claude <ludovic.claude at laposte.net>
Date:   Thu Jul 2 00:01:02 2009 +0000

    * Add Maven support
---
 debian/build.properties |  2 ++
 debian/build.xml        | 25 -------------------------
 debian/changelog        | 13 +++++++++++++
 debian/control          | 14 ++++++++------
 debian/maven.rules      |  1 +
 debian/orig-tar.sh      | 17 +++++++++++++++++
 debian/patches/pom.diff | 21 +++++++++++++++++++++
 debian/patches/series   |  1 +
 debian/rules            | 32 +++++++++++++-------------------
 9 files changed, 76 insertions(+), 50 deletions(-)

diff --git a/debian/build.properties b/debian/build.properties
index 5d26b40..6866e43 100644
--- a/debian/build.properties
+++ b/debian/build.properties
@@ -1 +1,3 @@
 javadoc.dir=build/api
+maven.test.skip=true
+build.sourceDirectory=src/java/main
diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index 8b2c142..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="classworlds" default="package" basedir="..">
-
-    <property file="debian/build.properties"/>
-    <property name="build.sourceDirectory" value="src/java/main"/>
-    <property name="maven.test.skip" value="true"/>
-    <property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
-
-    <target name="clean">
-        <ant target="clean" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="."/>
-    </target>
-
-    <target name="package">
-        <ant target="package" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir=".">
-            <property name="artifactId" value="classworlds"/>
-        </ant>
-    </target>
- 
-    <target name="javadoc">
-        <ant target="javadoc" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir=".">
-            <property name="artifactId" value="classworlds"/>
-        </ant>
-    </target>
-</project>
diff --git a/debian/changelog b/debian/changelog
index 318c165..d71467e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+classworlds (1.1-final-2) unstable; urgency=low
+
+  * Add watch file
+  * Change section to java, bump up Standards-Version to 3.8.1
+  * Add the Maven POM to the package,
+  * Add a Build-Depends-Indep dependency on maven-repo-helper
+  * Use mh_installpom and mh_installjar to install the POM and the jar to the
+    Maven repository
+  * Use quilt to patch the POM and use <project> as the top level element
+  * Change the dependency on java-gcj to default-jdk (Closes: #526281)
+
+ -- Ludovic Claude <ludovic.claude at laposte.net>  Thu, 16 Apr 2009 15:00:16 +0100
+
 classworlds (1.1-final-1) unstable; urgency=low
 
   * Update to the 1.1 release.
diff --git a/debian/control b/debian/control
index 63f861f..ea7415e 100644
--- a/debian/control
+++ b/debian/control
@@ -1,15 +1,17 @@
 Source: classworlds
-Section: libs
+Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Trygve Laugstøl <trygvis at inamo.no>, Paul Cager <paul-debian at home.paulcager.org>
-Build-Depends-Indep: java-gcj-compat-dev (>=1.0.65), ant-optional, libxalan2-java, maven-ant-helper (>=3)
-Build-Depends: ant, debhelper (>= 5), cdbs (>= 0.4.5.3)
-Standards-Version: 3.7.2
+Build-Depends-Indep: ant, ant-optional, libxalan2-java, maven-ant-helper (>> 4),
+ maven-repo-helper
+Build-Depends: debhelper (>= 5), cdbs (>= 0.4.5.3), default-jdk, quilt
+Standards-Version: 3.8.1
 
 Package: libclassworlds-java
 Architecture: all
-Section: libs
+Section: java
+Depends: ${misc:Depends}
 Suggests: libclassworlds-java-doc
 Description: framework for container developers requiring manipulation of ClassLoaders
  Classworlds is a framework for container developers who require complex
@@ -26,7 +28,7 @@ Description: framework for container developers requiring manipulation of ClassL
 Package: libclassworlds-java-doc
 Architecture: all
 Section: doc
-Depends: classpath-doc
+Depends: ${misc:Depends}, classpath-doc
 Suggests: libclassworlds-java
 Description: Documentation for the Classworlds Java library
  Classworlds is a framework for container developers who require complex
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..8577380
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1 @@
+junit junit jar s/3\..*/3.x/
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
new file mode 100755
index 0000000..cc87a6f
--- /dev/null
+++ b/debian/orig-tar.sh
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+VERSION=$2
+TAR=../classworlds_$VERSION.orig.tar.gz
+DIR=classworlds-$VERSION
+TAG=$(echo "CLASSWORLDS_$VERSION" | sed 's,1\.1-final,1_1,' | sed 's,-\(alpha\),_ALPHA_,' | sed 's,-\(beta\),_BETA_,' | sed 's,-\(rc\),_RC_,' | sed 's,\([0-9]\)\.,\1_,g' )
+
+svn export http://svn.codehaus.org/classworlds/tags/$TAG/classworlds/ $DIR
+tar -c -z -f $TAR $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"
+fi
diff --git a/debian/patches/pom.diff b/debian/patches/pom.diff
new file mode 100644
index 0000000..ec89722
--- /dev/null
+++ b/debian/patches/pom.diff
@@ -0,0 +1,21 @@
+--- a/pom.xml
++++ b/pom.xml
+@@ -1,10 +1,10 @@
+-<model>
++<project>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>classworlds</groupId>
+   <artifactId>classworlds</artifactId>
+   <packaging>jar</packaging>
+   <name>classworlds</name>
+-  <version>1.1-beta-1-SNAPSHOT</version>
++  <version>1.1</version>
+   <description></description>
+   <url>http://cvs.classworlds.codehaus.org/</url>
+   <inceptionYear>2002</inceptionYear>
+@@ -133,4 +133,4 @@
+     <name>The Codehaus</name>
+     <url>http://codehaus.org/</url>
+   </organization>
+-</model>
++</project>
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7740e23
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+pom.diff
diff --git a/debian/rules b/debian/rules
index 1e83093..bd3b9cd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,32 +2,26 @@
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/ant.mk
-include /usr/share/cdbs/1/rules/simple-patchsys.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 
-PACKAGE              := $(shell dpkg-parsechangelog | egrep '^Source:' | cut -f2 -d' ')
-VERSION              := $(shell dpkg-parsechangelog | egrep '^Version:' | sed "s,Version: \(.*\)-.*,\1,g")
-JAVA_HOME            := /usr/lib/jvm/java-gcj
-ANT_HOME             := /usr/share/ant
-DEB_JARS             := $(ANT_HOME)/lib/ant-launcher.jar $(ANT_HOME)/lib/ant-trax.jar xalan2
+PACKAGE              := $(DEB_SOURCE_PACKAGE)
+VERSION              := $(DEB_UPSTREAM_VERSION)
+JAVA_HOME            := /usr/lib/jvm/default-java
+DEB_JARS             := ant-trax ant-nodeps xalan2
 DEB_ANT_BUILD_TARGET := package javadoc
-DEB_ANT_BUILDFILE    := ./debian/build.xml
-DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
-#DEB_ANT_INVOKE       := ant -verbose -Dpackage=$(PACKAGE) -Dversion=$(VERSION) -f $(BUILD_FILE)
+DEB_ANT_BUILDFILE    := /usr/share/maven-ant-helper/maven-build.xml
+DEB_ANT_ARGS         := -Dbasedir=$(realpath .) -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
 API_DOCS             := build/api
-SVN                  := http://svn.codehaus.org/classworlds/tags/CLASSWORLDS_1_1_ALPHA_2/classworlds
 
 get-orig-source:
-	echo "Getting from $(SVN)"
-	rm -rf orig_tmp
-	mkdir orig_tmp
-	svn export -q $(SVN) orig_tmp/$(PACKAGE)
-	rm orig_tmp/$(PACKAGE)/lib/*.jar
-	( cd orig_tmp; tar czf ../../$(PACKAGE)_$(VERSION).orig.tar.gz $(PACKAGE) )
-	rm -rf orig_tmp
+		-uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
 
 binary-post-install/lib$(PACKAGE)-java::
-	dh_install -plib$(PACKAGE)-java build/$(PACKAGE)-$(VERSION).jar usr/share/java
-	dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-$(VERSION).jar usr/share/java/$(PACKAGE).jar
+	mh_installpoms -plib$(PACKAGE)-java
+	mh_installjar -plib$(PACKAGE)-java -l pom.xml --usj-version=$(VERSION) build/$(PACKAGE)-$(VERSION).jar
 
 binary-post-install/lib$(PACKAGE)-java-doc::
 	dh_install -plib$(PACKAGE)-java-doc build/api usr/share/doc/lib$(PACKAGE)-java
+
+clean::
+	-rm -rf debian/tmp

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



More information about the pkg-java-commits mailing list