[ini4j] 04/07: Build with maven-debian-helper

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri Feb 21 13:44:26 UTC 2014


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

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

commit 7e3da143218ebcd064bd19c22b2f2c4951801c78
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Feb 21 13:35:43 2014 +0100

    Build with maven-debian-helper
---
 debian/build.xml                  | 100 --------------------------------------
 debian/changelog                  |   1 +
 debian/control                    |  14 +++---
 debian/libini4j-java-doc.doc-base |   6 +--
 debian/libini4j-java-doc.install  |   2 +
 debian/libini4j-java.jlibs        |   1 -
 debian/libini4j-java.poms         |  28 +++++++++++
 debian/maven.ignoreRules          |  24 +++++++++
 debian/maven.properties           |   6 +++
 debian/maven.rules                |   1 +
 debian/rules                      |  30 ++----------
 11 files changed, 75 insertions(+), 138 deletions(-)

diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index 87fad36..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project basedir="../" default="build" name="ini4j">
-  <description>
-    Build script for [ini4j] library.
-  </description>
-
-<!-- config ============================================================== -->
-  <!-- general project attributes -->
-  <property name="artifactVersion" value="0.5.2-SNAPSHOT"/>
-  <property name="build.app.name" value="ini4j-${artifactVersion}"/>
-  <!-- directory locations -->
-  <property name="build.dst" value="${basedir}/build"/>
-  <property name="build.src" value="${basedir}/src/"/>
-  <property name="build.dist" value="${basedir}/dist"/>
-
-  <property name="build.dst.classes" value="${build.dst}/classes"/>
-  <property name="build.dst.doc"     value="${build.dst}/doc"/>
-
-  <!-- development tools -->
-  <property name="build.servlet.jar" value="/path/to/servlet.jar"/>
-  <property name="build.jetty.jar" value="/path/to/jetty.jar"/>
-  <!-- compiler options -->
-  <property name="build.compile.debug" value="true"/>
-  <property name="build.compile.deprecation" value="false"/>
-  <property name="build.compile.optimize" value="true"/>
-  <property name="build.compile.version" value="1.5"/>
-  <property name="build.compile.lint" value="-Xlint:unchecked"/>
-
-<!-- clean =============================================================== -->
-<target name="clean" description="Delete old build directory">
-    <delete dir="${build.dst}"/>
-    <delete dir="${build.dist}"/>
-</target>
-
-<!-- prepare ============================================================= -->
-<target name="prepare" description="Prepare build">
-    <path id="build.classpath">
-        <pathelement location="${build.dst.classes}"/>
-        <pathelement path="${java.class.path}"/>                
-        <pathelement location="${build.servlet.jar}"/>
-        <pathelement location="${build.jetty.jar}"/>
-    </path>
-
-    <mkdir dir="${build.dst}"/>
-    <mkdir dir="${build.dist}"/>
-    <mkdir dir="${build.dst.doc}"/>
-</target>
-
-<!-- compile ============================================================= -->
-<target name="compile" depends="prepare" description="Compile Java sources">
-    <mkdir dir="${build.dst.classes}"/>
-
-    <javac
-        classpathref="build.classpath"
-        debug="${build.compile.debug}"
-        deprecation="${build.compile.deprecation}"
-        optimize="${build.compile.optimize}"
-        source="${build.compile.version}"
-        destdir="${build.dst.classes}">        
-        <src path="${build.src}"/>               
-        <compilerarg value="${build.compile.lint}"/>
-        <compilerarg line="-encoding utf-8"/>
-    </javac>
-
-    <!-- copy resources -->
-    <copy todir="${build.dst.classes}">
-      <fileset dir="${build.src}" excludes="**/*.java **/*.html **/*.xml **/*.ini"/>
-    </copy>  
-</target>
-
-<!-- javadoc ============================================================= -->
-<target name="javadoc" depends="compile" description="Create Javadoc">
-     <javadoc
-        source="${build.compile.version}"
-        linksource="yes"
-        access="protected"
-        locale="en_US"
-        encoding="ISO-8859-1"
-        docencoding="ISO-8859-1"
-        noqualifier="java.*:javax.*:org.ini4j.*"
-        destdir="${build.dst.doc}/api"
-        windowtitle="[ini4j] API documentation">
-
-        <fileset dir="${build.src}">
-          <include name="**/*.java"/>
-        </fileset>
-        <doctitle>[ini4j] API documentation</doctitle>
-        <header><b>[ini4j]</b></header>
-        <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
-        <classpath refid="build.classpath"/>
-    </javadoc>
-</target>
-
-<!-- build =============================================================== -->
-<target name="build" depends="compile" description="Build jar distribution files">
-  <jar destfile="${build.dist}/${build.app.name}.jar">
-    <fileset dir="${build.dst.classes}" excludes="**/*Test* **/*Sample* **/*Run* **/META-INF/**" />
-  </jar>
-</target>
-</project>
diff --git a/debian/changelog b/debian/changelog
index bd56141..b533bcd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 ini4j (0.5.2-SNAPSHOT-3) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Build with maven-debian-helper (Closes: #656368)
   * Use canonical URLs for the Vcs-* fields
   * Standards-Version updated to 3.9.5 (no changes)
   * Switch to debhelper level 9
diff --git a/debian/control b/debian/control
index d7a18f9..86b27aa 100644
--- a/debian/control
+++ b/debian/control
@@ -2,10 +2,10 @@ Source: ini4j
 Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Marek Slama <marek.slama at sun.com>,
- Andres Mejia <amejia at debian.org>
-Build-Depends: debhelper (>= 9), javahelper, ant, ant-optional,
- default-jdk, libjetty-java, libservlet2.5-java, junit4, bsh, libeasymock-java
+Uploaders: Marek Slama <marek.slama at sun.com>, Andres Mejia <amejia at debian.org>
+Build-Depends: cdbs, debhelper (>= 9), maven-debian-helper,
+ default-jdk, libjetty-java, libservlet2.5-java, junit4, bsh, libeasymock-java,
+ libmaven-javadoc-plugin-java
 Standards-Version: 3.9.5
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/ini4j.git
 Vcs-Git: git://anonscm.debian.org/pkg-java/ini4j.git
@@ -13,7 +13,7 @@ Homepage: http://www.ini4j.org
 
 Package: libini4j-java
 Architecture: all
-Depends: ${java:Depends}, ${misc:Depends}
+Depends: ${maven:Depends}, ${misc:Depends}
 Recommends: jetty, libservlet2.5-java
 Description: Java API for handling Windows ini file format (library)
  The ini4j is a simple Java API for handling configuration
@@ -26,8 +26,8 @@ Description: Java API for handling Windows ini file format (library)
 Package: libini4j-java-doc
 Architecture: all
 Section: doc
-Depends: ${misc:Depends}
-Recommends: ${java:Recommends}
+Depends: ${maven:DocDepends}, ${misc:Depends}
+Recommends: ${maven:DocOptionalDepends}
 Description: Java API for handling Windows ini file format (documentation)
  The ini4j is a simple Java API for handling configuration
  files in Windows .ini format. Additionally, the library 
diff --git a/debian/libini4j-java-doc.doc-base b/debian/libini4j-java-doc.doc-base
index 846c5a6..8509b27 100644
--- a/debian/libini4j-java-doc.doc-base
+++ b/debian/libini4j-java-doc.doc-base
@@ -2,8 +2,8 @@ Document: libini4j-java-doc
 Title: ini4j API documentation
 Author: Ivan SZKIBA
 Abstract: This is the API documentation for ini4j.
-Section: Java
+Section: Programming
 
 Format: HTML
-Index: /usr/share/doc/libini4j-java-doc/api/index.html
-Files: /usr/share/doc/libini4j-java-doc/api/*.html
+Index: /usr/share/doc/libini4j-java/api/index.html
+Files: /usr/share/doc/libini4j-java/api/*.html
diff --git a/debian/libini4j-java-doc.install b/debian/libini4j-java-doc.install
new file mode 100644
index 0000000..ca2216a
--- /dev/null
+++ b/debian/libini4j-java-doc.install
@@ -0,0 +1,2 @@
+
+target/apidocs/* usr/share/doc/libini4j-java/api
diff --git a/debian/libini4j-java.jlibs b/debian/libini4j-java.jlibs
deleted file mode 100644
index 88bd79a..0000000
--- a/debian/libini4j-java.jlibs
+++ /dev/null
@@ -1 +0,0 @@
-#dist/ini4j-0.5.2-SNAPSHOT.jar
diff --git a/debian/libini4j-java.poms b/debian/libini4j-java.poms
new file mode 100644
index 0000000..1d885c3
--- /dev/null
+++ b/debian/libini4j-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 --has-package-version --java-lib
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..00ba913
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,24 @@
+
+com.google.code.maven-license-plugin maven-license-plugin * * * *
+jetty jetty * * * *
+junit junit * * * *
+net.sf.retrotranslator retrotranslator-runtime * * * *
+org.apache.maven.plugins maven-antrun-plugin * * * *
+org.apache.maven.plugins maven-assembly-plugin * * * *
+org.apache.maven.plugins maven-changes-plugin * * * *
+org.apache.maven.plugins maven-checkstyle-plugin * * * *
+org.apache.maven.plugins maven-dependency-plugin * * * *
+org.apache.maven.plugins maven-javadoc-plugin * * * *
+org.apache.maven.plugins maven-jxr-plugin * * * *
+org.apache.maven.plugins maven-pmd-plugin * * * *
+org.apache.maven.plugins maven-project-info-reports-plugin * * * *
+org.apache.maven.plugins maven-site-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
+org.apache.maven.plugins maven-surefire-plugin * * * *
+org.beanshell bsh * * * *
+org.codehaus.mojo cobertura-maven-plugin * * * *
+org.codehaus.mojo retrotranslator-maven-plugin * * * *
+org.codehaus.mojo taglist-maven-plugin * * * *
+org.codehaus.mojo wagon-maven-plugin * * * *
+org.easymock easymock * * * *
+org.easymock easymockclassextension * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..242da7e
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,6 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
+maven.test.skip=true
+project.build.sourceEncoding=UTF-8
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1 @@
+
diff --git a/debian/rules b/debian/rules
index 8be0cf5..5b9aff8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,33 +1,9 @@
 #!/usr/bin/make -f
 
-DEB_ANT_BUILDFILE = ./debian/build.xml
-DEB_ANT_BUILD_TARGET = build javadoc
-DEB_ANT_ARGS = -Dbuild.sysclasspath=first \
-	-Dbuild.servlet.jar=/usr/share/java/servlet-api-2.5.jar
-VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -f2 -d' ' \
-	| sed -r 's/^(.*)-.*$$/\1/')
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/maven.mk
 
-JARS = /usr/share/java/jetty.jar
-JARS := $(JARS):/usr/share/java/servlet-api-2.5.jar
-JARS := $(JARS):/usr/share/java/servlet-api.jar
-JARS := $(JARS):/usr/share/java/junit4.jar
-JARS := $(JARS):/usr/share/java/bsh.jar
-JARS := $(JARS):/usr/share/java/easymock.jar
-
-export CLASSPATH=$(JARS)
-export JAVA_HOME=/usr/lib/jvm/default-java
-
-%:
-	dh $@ --with javahelper
-
-override_dh_auto_build:
-	ant $(DEB_ANT_ARGS) -f $(DEB_ANT_BUILDFILE) $(DEB_ANT_BUILD_TARGET)
-
-override_dh_auto_clean:
-	ant $(DEB_ANT_ARGS) -f $(DEB_ANT_BUILDFILE) clean
-
-override_jh_installlibs:
-	jh_installlibs --upstream-version=$(VERSION) dist/ini4j-*.jar
+JAVA_HOME := /usr/lib/jvm/default-java
 
 get-orig-source:
 # Use external script

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



More information about the pkg-java-commits mailing list