[commons-csv] 34/35: Build with maven-debian-helper

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Sep 29 15:53:30 UTC 2015


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

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

commit ed5c554ffb3f78935a76e9ece56f17a4e491708e
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue Sep 29 15:15:40 2015 +0200

    Build with maven-debian-helper
---
 debian/ant.properties                       |  14 ---
 debian/build.xml                            | 153 ----------------------------
 debian/changelog                            |   4 +-
 debian/control                              |  17 +++-
 debian/libcommons-csv-java-doc.doc-base.api |  10 ++
 debian/libcommons-csv-java-doc.install      |   1 +
 debian/libcommons-csv-java.poms             |  28 +++++
 debian/maven.ignoreRules                    |  10 ++
 debian/maven.rules                          |   2 +
 debian/rules                                |  36 +------
 10 files changed, 68 insertions(+), 207 deletions(-)

diff --git a/debian/ant.properties b/debian/ant.properties
deleted file mode 100644
index 2013122..0000000
--- a/debian/ant.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# Ant properties file for Debian commons-csv source package
-
-# javac settings used by commons-csv compilation
-javac.debug=on
-javac.nowarn=off
-javac.verbose=yes
-#build.compiler=gcj
-compile.debug=on
-compile.optimize=on
-
-# Ensure that source and target are 1.5
-# For backwards compat on Java 7
-ant.build.javac.source=1.5
-ant.build.javac.target=1.5
diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index 29ce4e0..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--build.xml generated by maven from project.xml version 0.1-SNAPSHOT
-  on date September 18 2006, time 2225-->
-
-<project default="jar" name="commons-csv" basedir="..">
-  <property name="defaulttargetdir" value="target">
-  </property>
-  <property name="libdir" value="target/lib">
-  </property>
-  <property name="classesdir" value="target/classes">
-  </property>
-  <property name="testclassesdir" value="target/test-classes">
-  </property>
-  <property name="testclassesdir" value="target/test-classes">
-  </property>
-  <property name="testreportdir" value="target/test-reports">
-  </property>
-  <property name="distdir" value="dist">
-  </property>
-  <property name="javadocdir" value="dist/docs/api">
-  </property>
-  <property name="final.name" value="commons-csv-0.1-SNAPSHOT">
-  </property>
-  <path id="build.classpath">
-    <fileset dir="${libdir}">
-      <include name="**/*.jar">
-      </include>
-    </fileset>
-  </path>
-  <target name="init" description="o Initializes some properties">
-    <mkdir dir="${libdir}">
-    </mkdir>
-    <condition property="noget">
-      <equals arg2="only" arg1="${build.sysclasspath}">
-      </equals>
-    </condition>
-    <!--Test if JUNIT is present in ANT classpath-->
-
-    <available property="Junit.present" classname="junit.framework.Test">
-    </available>
-  </target>
-  <target name="compile" description="o Compile the code">
-    <mkdir dir="${classesdir}">
-    </mkdir>
-    <javac destdir="${classesdir}" deprecation="true" debug="true"
-    optimize="true" excludes="**/package.html" source="1.4" target="1.4">
-      <src>
-        <pathelement location="src/java">
-        </pathelement>
-      </src>
-      <classpath refid="build.classpath">
-      </classpath>
-    </javac>
-    <mkdir dir="${classesdir}/META-INF">
-    </mkdir>
-    <copy todir="${classesdir}/META-INF">
-      <fileset dir=".">
-        <include name="NOTICE.txt">
-        </include>
-      </fileset>
-    </copy>
-  </target>
-  <target name="jar" description="o Create the jar" depends="compile,test">
-    <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
-    </jar>
-  </target>
-  <target name="clean" description="o Clean up the generated directories">
-    <delete dir="${defaulttargetdir}">
-    </delete>
-    <delete dir="${distdir}">
-    </delete>
-  </target>
-  <target name="dist" description="o Create a distribution" depends="jar, javadoc">
-    <mkdir dir="dist">
-    </mkdir>
-    <copy todir="dist">
-      <fileset dir="${defaulttargetdir}" includes="*.jar">
-      </fileset>
-      <fileset dir="${basedir}" includes="LICENSE*, README*">
-      </fileset>
-    </copy>
-  </target>
-  <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
-    <fail message="There were test failures.">
-    </fail>
-  </target>
-  <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
-    <mkdir dir="${testreportdir}">
-    </mkdir>
-    <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
-      <sysproperty key="basedir" value=".">
-      </sysproperty>
-      <formatter type="xml">
-      </formatter>
-      <formatter usefile="false" type="plain">
-      </formatter>
-      <classpath>
-        <path refid="build.classpath">
-        </path>
-        <pathelement path="${testclassesdir}">
-        </pathelement>
-        <pathelement path="${classesdir}">
-        </pathelement>
-      </classpath>
-      <batchtest todir="${testreportdir}">
-        <fileset dir="src/test">
-          <include name="**/*Test.java">
-          </include>
-        </fileset>
-      </batchtest>
-    </junit>
-  </target>
-  <target name="junit-present" unless="Junit.present" depends="init">
-    <echo>================================= WARNING ================================</echo>
-    <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
-    <echo>==========================================================================</echo>
-  </target>
-  <target name="compile-tests" if="Junit.present" depends="junit-present,compile">
-    <mkdir dir="${testclassesdir}">
-    </mkdir>
-    <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
-      <src>
-        <pathelement location="src/test">
-        </pathelement>
-      </src>
-      <classpath>
-        <path refid="build.classpath">
-        </path>
-        <pathelement path="${classesdir}">
-        </pathelement>
-      </classpath>
-    </javac>
-  </target>
-  <target name="javadoc" description="o Generate javadoc">
-    <mkdir dir="${javadocdir}">
-    </mkdir>
-    <tstamp>
-      <format pattern="2005-yyyy" property="year">
-      </format>
-    </tstamp>
-    <property name="copyright" value="Copyright &copy;  The Apache Software Foundation. All Rights Reserved.">
-    </property>
-    <property name="title" value="Commons CSV 0.1-SNAPSHOT API">
-    </property>
-    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java" packagenames="org.apache.commons.csv.*">
-      <classpath>
-        <path refid="build.classpath">
-        </path>
-      </classpath>
-    </javadoc>
-  </target>
-</project>
diff --git a/debian/changelog b/debian/changelog
index b31b840..dd88222 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
-commons-csv (0.1-SNAPSHOT+svn678580-4) UNRELEASED; urgency=medium
+commons-csv (1.2-1) UNRELEASED; urgency=medium
 
   * Team upload.
+  * New upstream release
+    - Build with maven-debian-helper
   * Moved the package to Git
   * debian/control:
     - Removed Michael Koch from the uploaders (Closes: #654005)
diff --git a/debian/control b/debian/control
index 915591b..b7e8ee5 100644
--- a/debian/control
+++ b/debian/control
@@ -3,16 +3,23 @@ Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Emmanuel Bourg <ebourg at apache.org>
-Build-Depends: debhelper (>= 9), cdbs (>=0.4.48), default-jdk,
- ant-optional (>= 1.6.5), junit (>= 3.8.1)
+Build-Depends: cdbs,
+               debhelper (>= 9),
+               default-jdk,
+               junit4,
+               libcommons-io-java,
+               libh2-java,
+               libmaven-javadoc-plugin-java,
+               maven-debian-helper (>= 1.5)
 Standards-Version: 3.9.6
 Vcs-Git: git://anonscm.debian.org/pkg-java/commons-csv.git
 Vcs-Browser: http://anonscm.debian.org/cgit/pkg-java/commons-csv.git
-Homepage: http://commons.apache.org/sandbox/csv/
+Homepage: http://commons.apache.org/csv/
 
 Package: libcommons-csv-java
 Architecture: all
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, ${maven:Depends}
+Suggests: ${maven:OptionalDepends}
 Description: Library for reading and writing CSV files
  The Apache Commons CSV library provides a simple interface for reading
  and writing files in variations of the Comma Separated Value (CSV) format.
@@ -21,7 +28,7 @@ Description: Library for reading and writing CSV files
 
 Package: libcommons-csv-java-doc
 Architecture: all
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, ${maven:DocDepends}
 Section: doc
 Description: Library for reading and writing CSV files (documentation)
  The Apache Commons CSV library provides a simple interface for reading
diff --git a/debian/libcommons-csv-java-doc.doc-base.api b/debian/libcommons-csv-java-doc.doc-base.api
new file mode 100644
index 0000000..9e7ad7d
--- /dev/null
+++ b/debian/libcommons-csv-java-doc.doc-base.api
@@ -0,0 +1,10 @@
+Document: libcommons-csv-java
+Title: API Javadoc for Commons CSV
+Author: Commons CSV developers
+Abstract: This is the API Javadoc provided for the
+ libcommons-csv-java library.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libcommons-csv-java/api/index.html
+Files: /usr/share/doc/libcommons-csv-java/api/*
diff --git a/debian/libcommons-csv-java-doc.install b/debian/libcommons-csv-java-doc.install
new file mode 100644
index 0000000..45bd7be
--- /dev/null
+++ b/debian/libcommons-csv-java-doc.install
@@ -0,0 +1 @@
+target/apidocs/* usr/share/doc/libcommons-csv-java/api
diff --git a/debian/libcommons-csv-java.poms b/debian/libcommons-csv-java.poms
new file mode 100644
index 0000000..64b1188
--- /dev/null
+++ b/debian/libcommons-csv-java.poms
@@ -0,0 +1,28 @@
+# 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 --java-lib
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..f2e1045
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,10 @@
+
+org.apache.maven.plugins maven-antrun-plugin * * * *
+org.apache.maven.plugins maven-assembly-plugin * * * *
+org.apache.maven.plugins maven-checkstyle-plugin * * * *
+org.apache.maven.plugins maven-pmd-plugin * * * *
+org.apache.maven.plugins maven-scm-publish-plugin * * * *
+org.apache.rat apache-rat-plugin * * * *
+org.codehaus.mojo findbugs-maven-plugin * * * *
+org.codehaus.mojo javancss-maven-plugin * * * *
+org.codehaus.mojo taglist-maven-plugin * * * *
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..e85291e
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,2 @@
+
+junit junit jar s/4\..*/4.x/ * *
diff --git a/debian/rules b/debian/rules
index dc0f2a6..d778ba2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,43 +1,11 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
 
 include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/class/maven.mk
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# Use OpenJDK
 JAVA_HOME = /usr/lib/jvm/default-java
 
-DEB_ANT_BUILD_TARGET = init compile jar javadoc
-DEB_ANT_BUILDFILE = debian/build.xml
-
-# Needed for running the unit tests
-DEB_JARS = ant-junit junit
-
-# Upstream version information
-UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | grep -o "^.*svn[0-9]\+")
-UPSTREAM_RELEASE := $(shell echo $(UPSTREAM_VERSION) | grep -o "^[^+]\+")
-UPSTREAM_BASENAME = $(DEB_SOURCE_PACKAGE)-$(UPSTREAM_RELEASE)
-
-install/libcommons-csv-java::
-	install -m 0644 -D target/$(UPSTREAM_BASENAME).jar $(CURDIR)/debian/libcommons-csv-java/usr/share/java/commons-csv-$(UPSTREAM_VERSION).jar
-	dh_link /usr/share/java/commons-csv-$(UPSTREAM_VERSION).jar /usr/share/java/commons-csv.jar
-
-install/libcommons-csv-java-doc::
-	install -d $(CURDIR)/debian/libcommons-csv-java-doc/usr/share/doc/libcommons-csv-java-doc
-	cp -r dist/docs/api $(CURDIR)/debian/libcommons-csv-java-doc/usr/share/doc/libcommons-csv-java-doc/
-
-remove-source:
-	rm -f checkstyle.xml LICENSE.txt maven.xml NOTICE.txt pom.xml
-	rm -f project.properties project.xml
-	rm -rf debian/patched
-	rm -rf src target dist
-
-restore-from-source: remove-source
-	echo $(DEB_VERSION)
-	tar xzf ../commons-csv_$(UPSTREAM_VERSION).orig.tar.gz
+DEB_INSTALL_CHANGELOGS_ALL := RELEASE-NOTES.txt
 
 get-orig-source:
 	uscan --download-current-version --rename --force-download

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



More information about the pkg-java-commits mailing list