[libcommons-net-java] 02/05: Build with maven-debian-helper
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Nov 30 12:32:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository libcommons-net-java.
commit 6aec5177a71724c44e38c6b44a6ee6834ee69b8a
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Mon Nov 30 12:23:53 2015 +0100
Build with maven-debian-helper
---
debian/MANIFEST.MF | 47 ----
debian/README.Debian | 11 -
debian/build.properties | 4 -
debian/changelog | 8 +
debian/control | 3 +-
debian/libcommons-net-java-doc.install | 2 +-
debian/libcommons-net-java.poms | 29 ++-
debian/maven-build.xml | 433 ---------------------------------
debian/maven.ignoreRules | 8 +
debian/maven.properties | 5 +
debian/maven.rules | 3 +-
debian/rules | 33 +--
12 files changed, 59 insertions(+), 527 deletions(-)
diff --git a/debian/MANIFEST.MF b/debian/MANIFEST.MF
deleted file mode 100644
index f98e1ef..0000000
--- a/debian/MANIFEST.MF
+++ /dev/null
@@ -1,47 +0,0 @@
-Manifest-Version: 1.0
-Archiver-Version: Plexus Archiver
-Implementation-Title: Commons Net
-Implementation-Vendor: The Apache Software Foundation
-Implementation-Vendor-Id: org.apache
-Implementation-Version: @version@
-Specification-Title: Commons Net
-Specification-Vendor: The Apache Software Foundation
-Specification-Version: @version@
-X-Compile-Source-JDK: 1.5
-X-Compile-Target-JDK: 1.5
-Export-Package: org.apache.commons.net.finger;version="@version@",
- org.apache.commons.net.echo;version="@version@",
- org.apache.commons.net.ntp;version="@version@",
- org.apache.commons.net.io;version="@version@",
- org.apache.commons.net.imap;version="@version@",
- org.apache.commons.net.discard;version="@version@",
- org.apache.commons.net.smtp;version="@version@",
- org.apache.commons.net;version="@version@",
- org.apache.commons.net.pop3;version="@version@",
- org.apache.commons.net.telnet;version="@version@",
- org.apache.commons.net.nntp;version="@version@",
- org.apache.commons.net.bsd;version="@version@",
- org.apache.commons.net.daytime;version="@version@",
- org.apache.commons.net.time;version="@version@",
- org.apache.commons.net.ftp;version="@version@",
- org.apache.commons.net.util;version="@version@",
- org.apache.commons.net.whois;version="@version@",
- org.apache.commons.net.chargen;version="@version@",
- org.apache.commons.net.ftp.parser;version="@version@",
- org.apache.commons.net.tftp;version="@version@"
-Private-Package: examples.mail,examples.telnet,examples.cidr,examples.
- unix,examples.util,examples.nntp,examples.ntp,examples.ftp,examples
-Tool: Bnd-1.50.0
-Bundle-Name: Commons Net
-Bundle-Vendor: The Apache Software Foundation
-Bundle-Version: @version@
-Bnd-LastModified: @lastmodified@
-Bundle-ManifestVersion: 2
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0txt
-Bundle-Description: Apache Commons Net library contains a collection o
- f network utilities and protocol implementations.Supported protocols
- include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Telnet, Whoi
- s
-Import-Package: javax.crypto,javax.crypto.spec,javax.net,javax.net.ssl
-Bundle-SymbolicName: org.apache.commons.net
-Bundle-DocURL: http://commons.apache.org/net/
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 5513c93..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,11 +0,0 @@
-libcommons-net-java for Debian
-------------------------------
-
-Commons Net has switch its build process to Maven, but I'm not using Maven
-here as some components of Maven rely on this library.
-
-debian/MANIFEST.MF has been extracted from the official commons-net.jar and
-it may need to be updated for new releases.
-
- -- Ludovic Claude <ludovic.claude at laposte.net> Thu, 30 Apr 2009 12:05:34 +0100
-
diff --git a/debian/build.properties b/debian/build.properties
deleted file mode 100644
index e6f0afc..0000000
--- a/debian/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-javadoc.dir=build/docs/api
-#maven.test.skip=true
-build.javaVersion=1.5
-manifest=debian/tmp/MANIFEST.MF
diff --git a/debian/changelog b/debian/changelog
index 9af2f4f..6d85b7b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+libcommons-net-java (3.4-1) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * New upstream release
+ * Build with maven-debian-helper
+
+ -- Emmanuel Bourg <ebourg at apache.org> Mon, 30 Nov 2015 09:46:51 +0100
+
libcommons-net-java (3.3-2) unstable; urgency=medium
* Team upload.
diff --git a/debian/control b/debian/control
index 7e591a8..e84a108 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,7 @@ Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Ludovic Claude <ludovic.claude at laposte.net>, Emmanuel Bourg <ebourg at apache.org>
-Build-Depends: debhelper (>= 9), cdbs, default-jdk
-Build-Depends-Indep: ant, ant-optional, maven-ant-helper, maven-repo-helper, default-jdk-doc, junit4
+Build-Depends: debhelper (>= 9), default-jdk, maven-debian-helper, default-jdk-doc, junit4, libmaven-javadoc-plugin-java, libmaven-antrun-plugin-java, libbuild-helper-maven-plugin-java
Standards-Version: 3.9.6
Vcs-Git: git://anonscm.debian.org/pkg-java/libcommons-net-java.git
Vcs-Browser: http://anonscm.debian.org/cgit/pkg-java/libcommons-net-java.git
diff --git a/debian/libcommons-net-java-doc.install b/debian/libcommons-net-java-doc.install
index 83dc6d8..c6dd1d9 100644
--- a/debian/libcommons-net-java-doc.install
+++ b/debian/libcommons-net-java-doc.install
@@ -1 +1 @@
-build/docs/api usr/share/doc/libcommons-net-java/
+target/apidocs/* usr/share/doc/libcommons-net-java/api/
diff --git a/debian/libcommons-net-java.poms b/debian/libcommons-net-java.poms
index 43e746b..64b1188 100644
--- a/debian/libcommons-net-java.poms
+++ b/debian/libcommons-net-java.poms
@@ -1 +1,28 @@
-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 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-build.xml b/debian/maven-build.xml
deleted file mode 100644
index 49d9801..0000000
--- a/debian/maven-build.xml
+++ /dev/null
@@ -1,433 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="pkg-java" default="package" basedir=".">
-
- <!--
- maven-build.xml - an Ant build script that reproduces the Maven build life-cycle.
-
- You can use the following properties when launching this script:
-
- basedir: you need to supply the basedir, otherwise Ant will use the current location of this script,
- which is not what you want. For example, use:
- DEB_ANT_ARGS := -Dpackage=$(realpath .)
- package: the name of the source package. For example, use:
- DEB_ANT_ARGS := -Dversion=$(DEB_SOURCE_PACKAGE)
- bin.package: the name of the binary package. Defaults to lib${package}-java
- version: the version of the project, used in the name of the jar. Prefer to use the Debian version
- here as it makes the rules file easier to write when the version contains alpha, beta or rc versions.
- For example, use:
- DEB_ANT_ARGS := -Dversion=$(DEB_UPSTREAM_VERSION)
- debian.dir: the location of the debian directory. Defaults to ${basedir}/debian
- project.dir: the location of the current project. Defaults to ""
- pom.name: the name of the pom file. Must appear as it is in the debian/${bin.package}.poms file
- pom.file: the location of the pom file. Defaults to ${pom.name}
- maven.generate.target: if set, calls Maven with the given target before compiling code. For example, use
- maven.generate.target = plugin:generate to generate the plugin descriptor for a Maven plugin.
- maven.generate.target2: if set, calls Maven with another given target before compiling code. For example, use
- maven.generate.target2 = org.codehaus.plexus:plexus-component-metadata:${plexus-component-metadata.version}:generate-metadata
- to generate the Plexus components descriptor.
- maven.package.target: if set, calls Maven with the given target after packaging the jar. For example, use
- maven.target.target = shade:shade to use the shade plugin and repackage the contents of the jar.
- keep-cleaned-pom: if set, keeps the cleaned pom after packaging. If can be restored later by calling
- maven-build.xml with the restore-pom target (without the keep-cleaned-pom property set).
- use-local-repo: if set, then Maven will use a local repository copied from /usr/share/maven-repo into
- debian/tmp. This allows you to install some custom or intermediate artifacts, handy for multi modules builds.
- dependency, dependency2, dependency3...: Give the name of the dependent packages. Those packages will be
- used to form the links to the Javadoc APIs from the generated Javadoc.
- The links are of the form: file:///usr/share/doc/${dependency}/api
- Up to 15 dependencies can be defined here. Example use:
- dependency=libcommons-lang-java
- dependency2=libcommons-logging-java
-
- If you provide a pom file to your project, or the project already contains a pom file,
- then it will be read. You need to add /usr/share/java/ant-nodeps.jar to the classpath
- for this functionality to work.
-
- When using the Maven target, you need to add libmaven2-core-java to Build-Depends, as well as the
- library containing the Maven plugin to execute (libmaven-plugin-tools-java for plugin:generate,
- libplexus-component-metadata-java for org.codehaus.plexus:plexus-component-metadata:generate-metadata)
- -->
-
- <property name="bin.package" value="lib${package}-java" />
- <property name="debian.dir" value="${basedir}/debian" />
- <property name="project.dir" value="" />
- <property file="${debian.dir}/build.properties"/>
- <property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
- <property name="xml-input-factory" value="com.bea.xml.stream.MXParserFactory" />
- <property name="xml-output-factory" value="com.bea.xml.stream.XMLOutputFactoryBase" />
-
- <target name="init.pom">
- <condition property="use-local-repo" value="true">
- <isset property="maven.package.target" />
- </condition>
- <condition property="pom.file" value="pom.xml">
- <not>
- <isset property="pom.name" />
- </not>
- </condition>
- <condition property="pom.name" value="pom.xml" else="${project.dir}/pom.xml">
- <equals arg1="" arg2="${project.dir}" />
- </condition>
- <property name="pom.file" value="${pom.name}" />
- <available property="available.pom" file="${pom.file}"/>
-
- <echo message="Base dir is ${basedir}" />
- <echo message="Pom name in ${bin.package}.poms: ${pom.name}" />
- <echo message="Pom file ${pom.file} available? ${available.pom}" />
-
- <path id="repo-helper.classpath">
- <fileset dir="/usr/share/maven-repo">
- <include name="org/debian/maven/maven-repo-helper/debian/maven-repo-helper-debian.jar" />
- <include name="stax/stax-api/debian/stax-api-debian.jar" />
- <include name="stax/stax/debian/stax-debian.jar" />
- <include name="xml-apis/xml-apis/debian/xml-apis-debian.jar" />
- </fileset>
- </path>
-
- <path id="maven.classpath">
- <pathelement location="/usr/share/maven-ant-helper/bootstrap"/>
- <fileset dir="/usr/share/maven-repo">
- <include name="backport-util-concurrent/backport-util-concurrent/debian/backport-util-concurrent-debian.jar"/>
- <include name="classworlds/classworlds/debian/classworlds-debian.jar"/>
- <include name="com/jcraft/jsch/debian/jsch-debian.jar"/>
- <include name="commons-cli/commons-cli/debian/commons-cli-debian.jar"/>
- <include name="junit/junit/debian/junit-debian.jar"/>
- <include name="xml-apis/xml-apis/debian/xml-apis-debian.jar"/>
- <include name="org/apache/maven/doxia/doxia-logging-api/debian/doxia-logging-api-debian.jar"/>
- <include name="org/apache/maven/doxia/doxia-sink-api/debian/doxia-sink-api-debian.jar"/>
- <include name="org/apache/maven/maven-artifact/debian/maven-artifact-debian.jar"/>
- <include name="org/apache/maven/maven-artifact-manager/debian/maven-artifact-manager-debian.jar"/>
- <include name="org/apache/maven/maven-core/debian/maven-core-debian.jar"/>
- <include name="org/apache/maven/maven-error-diagnostics/debian/maven-error-diagnostics-debian.jar"/>
- <include name="org/apache/maven/maven-model/debian/maven-model-debian.jar"/>
- <include name="org/apache/maven/maven-monitor/debian/maven-monitor-debian.jar"/>
- <include name="org/apache/maven/maven-plugin-api/debian/maven-plugin-api-debian.jar"/>
- <include name="org/apache/maven/maven-plugin-descriptor/debian/maven-plugin-descriptor-debian.jar"/>
- <include name="org/apache/maven/maven-plugin-parameter-documenter/debian/maven-plugin-parameter-documenter-debian.jar"/>
- <include name="org/apache/maven/maven-plugin-registry/debian/maven-plugin-registry-debian.jar"/>
- <include name="org/apache/maven/maven-profile/debian/maven-profile-debian.jar"/>
- <include name="org/apache/maven/maven-project/debian/maven-project-debian.jar"/>
- <include name="org/apache/maven/maven-repository-metadata/debian/maven-repository-metadata-debian.jar"/>
- <include name="org/apache/maven/maven-settings/debian/maven-settings-debian.jar"/>
- <include name="org/apache/maven/reporting/maven-reporting-api/debian/maven-reporting-api-debian.jar"/>
- <include name="org/apache/maven/wagon/wagon-provider-api/debian/wagon-provider-api-debian.jar"/>
- <include name="org/apache/maven/wagon/wagon-ssh-common/debian/wagon-ssh-common-debian.jar"/>
- <include name="org/apache/maven/wagon/wagon-ssh/debian/wagon-ssh-debian.jar"/>
- <include name="org/codehaus/plexus/plexus-container-default/1.0-alpha/plexus-container-default-1.0-alpha.jar"/>
- <include name="org/codehaus/plexus/plexus-interactivity-api/debian/plexus-interactivity-api-debian.jar"/>
- <include name="org/codehaus/plexus/plexus-interpolation/debian/plexus-interpolation-debian.jar"/>
- <include name="org/codehaus/plexus/plexus-utils/debian/plexus-utils-debian.jar"/>
- <include name="org/sonatype/plexus/plexus-cipher/debian/plexus-cipher-debian.jar"/>
- <include name="org/sonatype/plexus/plexus-sec-dispatcher/debian/plexus-sec-dispatcher-debian.jar"/>
- </fileset>
- </path>
-
- </target>
-
- <!-- /usr/share/java/ant-nodeps.jar must be in the classpath -->
- <target name="read.pom" depends="init.pom" if="available.pom">
-
- <loadfile srcfile="${debian.dir}/${bin.package}.poms" property="cleaner.options">
- <filterchain>
- <linecontains>
- <contains value="${pom.name}" />
- </linecontains>
- <tokenfilter>
- <containsregex
- pattern="[^ ]*(.*)"
- replace="\1"/>
- </tokenfilter>
- <striplinebreaks/>
- </filterchain>
- </loadfile>
- <!-- default empty value -->
- <property name="cleaner.options" value=""/>
- <echo message="Cleaner options: ${cleaner.options}" />
-
- <mkdir dir="${debian.dir}/tmp" />
- <delete>
- <fileset dir="${debian.dir}/tmp">
- <include name="pom.xml" />
- <include name="pom.properties" />
- </fileset>
- </delete>
-
- <property name="pom.loc" location="${pom.file}" />
- <echo message="Cleaning pom ${pom.loc}" />
-
- <java fork="true" dir="."
- classname="org.debian.maven.repo.POMCleaner">
- <classpath refid="repo-helper.classpath"/>
- <sysproperty key="javax.xml.stream.XMLInputFactory" value="${xml-input-factory}" />
- <sysproperty key="javax.xml.stream.XMLOutputFactory" value="${xml-output-factory}" />
- <arg value="-p${bin.package}" />
- <arg value="-r${debian.dir}/maven.rules" />
- <arg value="-i${debian.dir}/maven.publishedRules" />
- <arg value="--verbose" />
- <arg line="${cleaner.options} --keep-pom-version" />
- <arg value="${pom.loc}" />
- <arg value="${debian.dir}/tmp/pom.xml" />
- <arg value="${debian.dir}/tmp/pom.properties" />
- </java>
- <copy file="${pom.file}" tofile="${pom.file}.save" />
- <!-- force the pom file to be located in the current dir, we'll need it when running Maven plugins -->
- <copy file="${debian.dir}/tmp/pom.xml" tofile="${pom.file}" overwrite="true" />
- <property file="${debian.dir}/tmp/pom.properties"/>
-
- <echo message="Properties read from the POM file:" />
- <echo message=" groupId: ${groupId}" />
- <echo message=" artifactId: ${artifactId}" />
- </target>
-
- <target name="init" depends="read.pom">
- <available property="available.sources" file="${build.sourceDirectory}"/>
- <available property="available.resources" file="${build.resourcesDirectory}"/>
- <available property="available.testResources" file="${build.testResourcesDirectory}"/>
- <available property="available.testSources" file="${build.testSourceDirectory}"/>
-
- <fail unless="artifactId" message="Missing required property: artifactId"/>
- <fail unless="version" message="Missing required property: version"/>
- <fail unless="basedir" message="Missing required property: basedir"/>
-
- <echo message="Compile classpath: ${classpath.full.compile}"/>
- <echo message="Test classpath: ${classpath.full.test}"/>
- </target>
-
- <!--
- | LIFECYCLE: Clean
- |-->
-
- <target name="clean">
- <delete dir="${build.directory}"/>
- </target>
-
- <!--
- | LIFECYCLE: jar
- |
- | This mimics the default Maven build life-cycle: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
- |-->
-
- <target name="process-resources" depends="init" if="available.resources">
- <mkdir dir="${build.outputDirectory}"/>
- <copy todir="${build.outputDirectory}">
- <fileset dir="${build.resourcesDirectory}"/>
- </copy>
- </target>
-
- <target name="process-pom" depends="init" if="available.pom">
- <mkdir dir="${build.outputDirectory}/META-INF/maven/${groupId}/${artifactId}"/>
- <copy todir="${build.outputDirectory}/META-INF/maven/${groupId}/${artifactId}">
- <fileset dir="${debian.dir}/tmp">
- <include name="pom.xml" />
- <include name="pom.properties" />
- </fileset>
- </copy>
- </target>
-
- <macrodef name="run-maven">
- <attribute name="target"/>
- <sequential>
- <java fork="true" dir="." classname="org.apache.maven.cli.MavenCli" failonerror="true">
- <jvmarg value="-Xmx256M"/>
- <classpath refid="maven.classpath"/>
- <arg value="-Dmaven.test.skip"/>
- <arg value="--offline"/>
- <arg value="-e"/>
- <arg value="-B"/>
- <arg value="-s${debian.dir}/maven-settings.xml"/>
- <arg value="@{target}"/>
- </java>
- </sequential>
- </macrodef>
-
- <macrodef name="run-maven-local-repo">
- <attribute name="target"/>
- <sequential>
- <mkdir dir="${debian.dir}/tmp/maven-repo" />
- <copy todir="${debian.dir}/tmp/maven-repo">
- <fileset dir="/usr/share/maven-repo" />
- </copy>
-
- <java fork="true" dir="." classname="org.apache.maven.cli.MavenCli" failonerror="true">
- <jvmarg value="-Xmx256M"/>
- <classpath refid="maven.classpath"/>
- <arg value="-Dmaven.test.skip"/>
- <arg value="--offline"/>
- <arg value="-e"/>
- <arg value="-B"/>
- <arg value="--offline"/>
- <arg value="-Dmaven.repo.local=${debian.dir}/tmp/maven-repo"/>
- <arg value="@{target}"/>
- </java>
- </sequential>
- </macrodef>
-
- <target name="mvn-shared-repo" unless="use-local-repo">
- <!-- Calls mvn ${maven.generate.target} -->
- <run-maven target="${_target}" />
- </target>
- <target name="mvn-local-repo" if="use-local-repo">
- <!-- Calls mvn ${maven.generate.target} -->
- <run-maven-local-repo target="${_target}" />
- </target>
- <target name="mvn" depends="mvn-shared-repo,mvn-local-repo" />
-
- <target name="mvn-generate" depends="init" if="maven.generate.target">
- <antcall target="mvn" inheritRefs="true">
- <param name="_target" value="${maven.generate.target}" />
- </antcall>
- </target>
-
- <target name="mvn-generate2" depends="init" if="maven.generate.target2">
- <antcall target="mvn" inheritRefs="true">
- <param name="_target" value="${maven.generate.target2}" />
- </antcall>
- </target>
-
- <target name="compile" depends="process-resources,process-pom,mvn-generate,mvn-generate2" if="available.sources">
- <mkdir dir="${build.outputDirectory}"/>
- <mkdir dir="${build.directory}/generated-sources"/>
- <javac
- destdir="${build.outputDirectory}"
- classpath="${classpath.compile}"
- nowarn="true"
- source="${build.javaVersion}" target="${build.javaVersion}"
- debug="on"
- excludes="**/examples/**">
- <src path="${build.sourceDirectory}"/>
- <src path="${build.directory}/generated-sources"/>
- </javac>
- </target>
-
- <target name="process-test-resources" depends="compile" if="available.testResources" unless="maven.test.skip">
- <mkdir dir="${build.testOutputDirectory}"/>
- <copy todir="${build.testOutputDirectory}">
- <fileset dir="${build.testResourcesDirectory}"/>
- </copy>
- </target>
-
- <target name="test-compile" depends="process-test-resources" if="available.testSources" unless="maven.test.skip">
- <mkdir dir="${build.testOutputDirectory}"/>
- <javac
- destdir="${build.testOutputDirectory}"
- classpath="${classpath.full.test}"
- nowarn="true"
- source="${build.javaVersion}" target="${build.javaVersion}"
- debug="on">
- <src path="${build.testSourceDirectory}"/>
- </javac>
- </target>
-
- <target name="test" depends="test-compile" unless="maven.test.skip">
- <mkdir dir="${build.directory}/test-output"/>
- <junit printsummary="yes" haltonfailure="yes"> <!-- fork="yes" forkmode="once" -->
- <sysproperty key="basedir" value="${basedir}"/>
- <classpath>
- <pathelement path="${classpath.full.test}"/>
- </classpath>
-
- <formatter type="plain"/>
- <batchtest todir="${build.directory}/test-output">
- <fileset dir="${build.testSourceDirectory}">
- <include name="**/*Test.java"/>
- <exclude name="**/Abstract*"/>
- <exclude name="**/*FunctionalTest.java"/>
- <exclude name="**/POP3*"/>
- <exclude name="${maven.test.exclude}"/>
- </fileset>
- </batchtest>
- </junit>
- </target>
-
- <target name="jar" depends="test">
- <jar jarfile="${build.directory}/${artifactId}-${version}.jar"
- basedir="${build.outputDirectory}"
- manifest="${manifest}" />
- </target>
-
- <target name="mvn-package" depends="jar" if="maven.package.target">
- <!-- do a POM transform in order to keep important plugin configuration for Maven -->
- <delete file="${pom.file}" />
- <echo message="Transform ${pom.file}" />
- <java fork="true" dir="."
- classname="org.debian.maven.repo.POMCleaner">
- <classpath refid="repo-helper.classpath"/>
- <sysproperty key="javax.xml.stream.XMLInputFactory" value="${xml-input-factory}" />
- <sysproperty key="javax.xml.stream.XMLOutputFactory" value="${xml-output-factory}" />
- <arg value="-p${bin.package}" />
- <arg value="-r${debian.dir}/maven.rules" />
- <arg value="-i${debian.dir}/maven.publishedRules" />
- <arg value="--verbose" />
- <arg value="--keep-all-elements" />
- <arg line="${cleaner.options} --keep-pom-version" />
- <arg value="${pom.file}.save" />
- <arg value="${pom.file}" />
- <arg value="${debian.dir}/tmp/pom.properties" />
- </java>
- <!-- Calls mvn ${maven.package.target} -->
- <run-maven-local-repo target="${maven.package.target}" />
- </target>
-
- <target name="restore-pom" depends="init.pom" unless="keep-cleaned-pom">
- <!-- restore the pom file -->
- <copy file="${pom.file}.save" tofile="${pom.file}" overwrite="true"/>
- </target>
-
- <target name="package" depends="jar,mvn-package,restore-pom" />
-
- <macrodef name="prepare-package-list">
- <attribute name="package" />
- <sequential>
- <mkdir dir="${build.directory}/@{package}" />
- <copy todir="${build.directory}/@{package}">
- <fileset dir="/usr/share/doc">
- <include name="@{package}/api/package*list" />
- </fileset>
- </copy>
- <!-- the file package-list is no longer compressed but leaving <gunzip/> here for backporting
- <gunzip src="/usr/share/doc/@{package}/api/package-list.gz" dest="${build.directory}/@{package}" />
- -->
- </sequential>
- </macrodef>
-
- <!--
- | Javadoc
- |-->
-
- <target name="javadoc">
- <mkdir dir="${javadoc.dir}"/>
- <prepare-package-list package="openjdk-6-doc" />
- <javadoc
- source="${build.javaVersion}"
- sourcepath="${build.sourceDirectory}"
- destdir="${javadoc.dir}"
- author="true"
- version="true"
- windowtitle="${package} API"
- doctitle="${package} - ${version}"
- classpath="${classpath.full.compile}" >
-
- <packageset dir="${build.sourceDirectory}" defaultexcludes="yes">
- <include name="**"/>
- </packageset>
- <link href="file:///usr/share/doc/default-jdk-doc/api" packagelistLoc="${build.directory}/default-jdk-doc" />
- <link href="file:///usr/share/doc/openjdk-6-doc/api" packagelistLoc="${build.directory}/openjdk-6-doc" />
- <link href="file:///usr/share/doc/classpath-doc/api" />
- <link href="file:///usr/share/doc/${dependency}/api" />
- <link href="file:///usr/share/doc/${dependency2}/api" />
- <link href="file:///usr/share/doc/${dependency3}/api" />
- <link href="file:///usr/share/doc/${dependency4}/api" />
- <link href="file:///usr/share/doc/${dependency5}/api" />
- <link href="file:///usr/share/doc/${dependency6}/api" />
- <link href="file:///usr/share/doc/${dependency7}/api" />
- <link href="file:///usr/share/doc/${dependency8}/api" />
- <link href="file:///usr/share/doc/${dependency9}/api" />
- <link href="file:///usr/share/doc/${dependency10}/api" />
- <link href="file:///usr/share/doc/${dependency11}/api" />
- <link href="file:///usr/share/doc/${dependency12}/api" />
- <link href="file:///usr/share/doc/${dependency13}/api" />
- <link href="file:///usr/share/doc/${dependency14}/api" />
- <link href="file:///usr/share/doc/${dependency15}/api" />
- </javadoc>
- </target>
-</project>
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..d0f7978
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,8 @@
+
+org.apache.maven.plugins maven-assembly-plugin * * * *
+org.apache.maven.plugins maven-checkstyle-plugin * * * *
+org.apache.maven.plugins maven-scm-publish-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
+org.codehaus.mojo clirr-maven-plugin * * * *
+org.codehaus.mojo exec-maven-plugin * * * *
+org.codehaus.mojo findbugs-maven-plugin * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..c14f797
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,5 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
+project.build.sourceEncoding=ISO-8859-1
diff --git a/debian/maven.rules b/debian/maven.rules
index 993fa59..e85291e 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -1 +1,2 @@
-junit junit jar s/4\..*/4.x/
+
+junit junit jar s/4\..*/4.x/ * *
diff --git a/debian/rules b/debian/rules
index 9808d4d..aba22ec 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,33 +1,12 @@
#!/usr/bin/make -f
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export JAVA_HOME := /usr/lib/jvm/default-java
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/ant.mk
+%:
+ dh $@ --buildsystem=maven
-PACKAGE := $(DEB_SOURCE_PACKAGE)
-VERSION := $(DEB_UPSTREAM_VERSION)
-JAVA_HOME := /usr/lib/jvm/default-java
-DEB_JARS := ant-nodeps ant-junit ant-junit4 junit4
-DEB_ANT_BUILD_TARGET := package javadoc
-# work with a slightly modified version of maven-ant-helper's build file:
-DEB_ANT_BUILDFILE := debian/maven-build.xml
-DEB_ANT_ARGS := -Dbasedir=$(CURDIR) -Dpackage=$(PACKAGE) -Dbin.package=$(PACKAGE) -Dversion=$(VERSION)
-LAST_MODIFIED := $(shell date +%s%N | cut -c -13)
-DEB_INSTALL_CHANGELOGS_ALL := RELEASE-NOTES.txt
-
-makebuilddir/$(PACKAGE)::
- install -d debian/tmp
- cat debian/MANIFEST.MF | sed 's/@version@/$(VERSION)/g' | sed 's/@lastmodified@/$(LAST_MODIFIED)/' > debian/tmp/MANIFEST.MF
-
-binary-post-install/$(PACKAGE)::
- mh_installpoms -p$(PACKAGE)
- mh_installjar -p$(PACKAGE) -l --usj-name=commons-net pom.xml build/commons-net-$(VERSION).jar
-
-clean::
- rm -fr debian/.mh/
+override_dh_installchangelogs:
+ dh_installchangelogs RELEASE-NOTES.txt
get-orig-source:
- uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
-
+ uscan --download-current-version --force-download --no-symlink
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libcommons-net-java.git
More information about the pkg-java-commits
mailing list