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

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

commit 7b1fad9df48d72c7bf142661a84469c3da1ee2d4
Author: Emmanuel Bourg <[email protected]>
Date:   Tue Jan 5 12:23:26 2016 +0100

    Build with Maven and install the artifacts in /use/share/maven-repo
---
 debian/changelog                                  |   1 +
 debian/control                                    |   3 +-
 debian/libdnsjava-java.poms                       |  28 ++++
 debian/maven.ignoreRules                          |   4 +
 debian/maven.properties                           |   5 +
 debian/maven.rules                                |   2 +
 debian/patches/build-bundle-default.patch         |  13 --
 debian/patches/removes-bnd.jar-download.patch     |  17 --
 debian/patches/removes-packages-from-bundle.patch |  14 --
 debian/patches/series                             |   3 -
 debian/pom.xml                                    | 183 ++++++++++++++++++++++
 debian/rules                                      |  18 +--
 12 files changed, 233 insertions(+), 58 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3a57013..68ea4d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 dnsjava (2.1.7-1) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Build with Maven and install the artifacts in /use/share/maven-repo
   * debian/control:
     - Added the missing Vcs-* fields
     - The package is now maintained by the Java Team
diff --git a/debian/control b/debian/control
index 5f9f85b..549ebfb 100644
--- a/debian/control
+++ b/debian/control
@@ -5,8 +5,7 @@ Maintainer: Debian Java Maintainers 
<[email protected]
 Uploaders: Chris Grzegorczyk <[email protected]>,
            Graziano Obertelli <[email protected]>,
            Kyo Lee <[email protected]>
-Build-Depends-Indep: default-jdk, junit
-Build-Depends: ant, ant-optional, debhelper (>= 9), cdbs, bnd
+Build-Depends: default-jdk, junit, debhelper (>= 9), maven-debian-helper, 
libmaven-bundle-plugin-java
 Standards-Version: 3.9.6
 Vcs-Git: git://anonscm.debian.org/pkg-java/dnsjava.git
 Vcs-Browser: http://anonscm.debian.org/cgit/pkg-java/dnsjava.git
diff --git a/debian/libdnsjava-java.poms b/debian/libdnsjava-java.poms
new file mode 100644
index 0000000..8545d14
--- /dev/null
+++ b/debian/libdnsjava-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
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..a32e7de
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,4 @@
+
+org.apache.maven.plugins maven-gpg-plugin * * * *
+org.apache.maven.plugins maven-javadoc-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..e593715
--- /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
+
+maven.test.skip=true
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..9d87a49
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,2 @@
+
+junit junit jar s/3\..*/3.x/ * *
diff --git a/debian/patches/build-bundle-default.patch 
b/debian/patches/build-bundle-default.patch
deleted file mode 100644
index 58386d5..0000000
--- a/debian/patches/build-bundle-default.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Description: Patch enables building an OSGi bundle
- Changes the default target of the ant build.xml.
- The result jar file that will be used for the package will be an OSGi
- bundle enabled jar.
-Author: Damian Minkov <[email protected]>
---- a/build.xml
-+++ b/build.xml
-@@ -1,4 +1,4 @@
--<project name="dnsjava" default="all" basedir=".">
-+<project name="dnsjava" default="bundle" basedir=".">
-     <property name="build_dir" value="${basedir}"/>
-     <property name="src_dir" value="${basedir}"/>
-     <property name="doc_dir" value="${basedir}/doc"/>
diff --git a/debian/patches/removes-bnd.jar-download.patch 
b/debian/patches/removes-bnd.jar-download.patch
deleted file mode 100644
index 12b1aef..0000000
--- a/debian/patches/removes-bnd.jar-download.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: Removes internet connectivity requirement.
-Index: dnsjava/build.xml
-===================================================================
---- dnsjava.orig/build.xml     2013-04-11 00:05:09.000000000 +0300
-+++ dnsjava/build.xml  2013-07-23 11:32:39.000000000 +0300
-@@ -46,10 +46,8 @@
-     </target>
-       
-       <target name="bundle" description="Creates an OSGi bundle" 
depends="jar">
--              <get 
src="http://www.aqute.biz/repo/biz/aQute/bnd/0.0.384/bnd-0.0.384.jar";
--                      dest="${build_dir}/bnd.jar"/>
-               <taskdef resource="aQute/bnd/ant/taskdef.properties"
--                      classpath="${build_dir}/bnd.jar"/> 
-+                      classpath="/usr/share/java/bnd.jar"/> 
-               <echo file="${dist_dir}/dnsjava-${version}.bnd" append="false">
-                       Bundle-Version: ${version}
-                       Bundle-Name: dnsjava is an implementation of DNS in Java
diff --git a/debian/patches/removes-packages-from-bundle.patch 
b/debian/patches/removes-packages-from-bundle.patch
deleted file mode 100644
index bbaf616..0000000
--- a/debian/patches/removes-packages-from-bundle.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Removes unused android.* packages which can prevent bundle from 
starting.
-Index: dnsjava/build.xml
-===================================================================
---- dnsjava.orig/build.xml
-+++ dnsjava/build.xml
-@@ -57,7 +57,7 @@
-                       Export-Package: 
org.xbill.DNS;version=${version},org.xbill.DNS.spi;version=${version},org.xbill.DNS.utils;version=${version},org.xbill.DNS.windows;version=${version}
-                       Bundle-Vendor: dnsjava.org
-                       Bundle-RequiredExecutionEnvironment: J2SE-1.4
--                      Import-Package: !org.xbill.DNS*,!sun.*,*
-+                      Import-Package: !org.xbill.DNS*,!sun.*,!android.*,*
-               </echo>
-               <bndwrap
-                       definitions="${dist_dir}"
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 5460bf0..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-build-bundle-default.patch
-removes-bnd.jar-download.patch
-removes-packages-from-bundle.patch
diff --git a/debian/pom.xml b/debian/pom.xml
new file mode 100644
index 0000000..1d3d85c
--- /dev/null
+++ b/debian/pom.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";
+    xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+    <parent>
+        <groupId>org.sonatype.oss</groupId>
+        <artifactId>oss-parent</artifactId>
+        <version>7</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>dnsjava</groupId>
+    <artifactId>dnsjava</artifactId>
+    <version>2.1.7</version>
+    <name>dnsjava</name>
+    <description>dnsjava is an implementation of DNS in Java. It supports all 
defined record types (including the DNSSEC types), and unknown types. It can be 
used for queries, zone transfers, and dynamic updates. It includes a cache 
which can be used by clients, and a minimal implementation of a server. It 
supports TSIG authenticated messages, partial DNSSEC verification, and EDNS0. 
</description>
+    <url>http://www.dnsjava.org</url>
+    <licenses>
+        <license>
+            <name>BSD 2-Clause license</name>
+            <url>http://opensource.org/licenses/BSD-2-Clause</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+    <scm>
+        <connection>scm:git:https://github.com/dnsjava/dnsjava</connection>
+        
<developerConnection>scm:git:[email protected]:dnsjava/dnsjava</developerConnection>
+        <url>https://github.com/dnsjava/dnsjava</url>
+        <tag>v2.1.6</tag>
+    </scm>
+    <developers>
+        <developer>
+            <id>bwelling</id>
+            <name>Brian Wellington</name>
+        </developer>
+    </developers>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <target.jdk>1.4</target.jdk>
+    </properties>
+
+    <build>
+        <sourceDirectory>./</sourceDirectory>
+        <testSourceDirectory>./tests</testSourceDirectory>
+        <resources>
+            <resource>
+                <directory>org/xbill/DNS/spi/</directory>
+                <targetPath>META-INF</targetPath>
+                <includes>
+                    <include>services/</include>
+                </includes>
+            </resource>
+        </resources>
+
+        <plugins>
+        
+        <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-gpg-plugin</artifactId>
+        <version>1.4</version>
+        <executions>
+          <execution>
+            <id>sign-artifacts</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>sign</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.0</version>
+                <configuration>
+                    <source>${target.jdk}</source>
+                    <target>${target.jdk}</target>
+                    <encoding>iso8859-1</encoding>
+                    <testExcludes>
+                        <!-- Exclude unit tests with external dependencies -->
+                        <exclude>**/DNSSECWithLunaProviderTest.java</exclude>
+                    </testExcludes>
+                    <includes>
+                        <include>org/**/*.java</include>
+                    </includes>
+                    <excludes>
+                        <include>*.java</include>
+                        <exclude>org/xbill/DNS/tests/**</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>2.2.1</version>
+                <configuration>
+                    <includes>
+                        <include>*.java</include>
+                        <include>org/**/*.java</include>
+                    </includes>
+                    <excludes>
+                        <exclude>org/xbill/DNS/tests/</exclude>
+                    </excludes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar-no-fork</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.4</version>
+                <configuration>
+                    <archive>
+                        
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+                        <manifestEntries>
+                            
<Bundle-RequiredExecutionEnvironment>J2SE-1.4</Bundle-RequiredExecutionEnvironment>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.4.0</version>
+                <configuration>
+                    <instructions>
+                        
<Export-Package>org.xbill.DNS;uses:="org.xbill.DNS.util",org.xbill.DNS.spi;uses:="org.xbill.DNS,sun.net.spi.nameservice",org.xbill.DNS.utils,org.xbill.DNS.windows</Export-Package>
+                        
<Import-Package>!org.xbill.DNS*,!sun.*,!android.*,*</Import-Package>
+                    </instructions>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>bundle-manifest</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.7</version>
+                <configuration>
+                    <excludePackageNames>*.tests.*</excludePackageNames>
+                    <sourcepath>./org</sourcepath>
+                    <debug>true</debug>
+                    <windowtitle>dnsjava documentation</windowtitle>
+                    <footer></footer>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>attach-javadocs</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.2</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git a/debian/rules b/debian/rules
index d7ddb9d..4dc9913 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,14 +1,14 @@
 #!/usr/bin/make -f
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/ant.mk
+export JAVA_HOME = /usr/lib/jvm/default-java
 
-JAVA_HOME            := /usr/lib/jvm/default-java
-#DEB_ANT_CHECK_TARGET := run_tests
-DEB_JARS             := junit ant-junit
+%:
+       dh $@ --buildsystem=maven
 
-binary-post-install/lib$(DEB_SOURCE_PACKAGE)-java::
-       mv org.xbill.dns_$(DEB_UPSTREAM_VERSION).jar 
$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).jar
-       dh_install $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).jar 
usr/share/java
-       dh_link -plib$(DEB_SOURCE_PACKAGE)-java 
usr/share/java/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).jar 
usr/share/java/$(DEB_SOURCE_PACKAGE).jar
+override_dh_auto_configure:
+       cp debian/pom.xml .
+       dh_auto_configure
 
+override_dh_auto_clean:
+       dh_auto_clean
+       rm -f pom.xml

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

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to