[libpostgresql-jdbc-java] 02/05: Build with Maven instead of Ant
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 19:00:00 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository libpostgresql-jdbc-java.
commit 9df20ad5909e4f0f7bccaac6840e2c23747647a6
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Mon Jan 9 17:00:58 2017 +0100
Build with Maven instead of Ant
---
debian/changelog | 5 +-
debian/clean | 2 -
debian/control | 17 +--
debian/libpostgresql-jdbc-java-doc.install | 1 +
debian/libpostgresql-jdbc-java-doc.javadoc | 1 -
debian/libpostgresql-jdbc-java.poms | 31 ++++-
debian/maven.properties | 8 ++
debian/patches/01-missing-pom-configuration.patch | 137 ++++++++++++++++++++++
debian/patches/classpath.patch | 18 ---
debian/patches/link-javadoc.patch | 12 --
debian/patches/series | 3 +-
debian/rules | 5 +-
12 files changed, 192 insertions(+), 48 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9246084..7ca7faa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,10 @@
-libpgjava (9.3-1104-1) UNRELEASED; urgency=medium
+libpgjava (9.4.1212-1) UNRELEASED; urgency=medium
* Team upload.
* New upstream release
- Refreshed the patches
- - Disabled remote jar fetching
+ - Build with Maven instead of Ant
* No longer build the JDBC 3 jar, default to JDBC 4 (Closes: #820943, #820942)
- * Use the upstream POM (org.postgresql:postgresql)
* Removed the dummy libpg-java package
* Standards-Version updated to 3.9.8
* Switch to debhelper level 10
diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index 1f2aa19..0000000
--- a/debian/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-postgresql-jdbc3.jar
-postgresql-jdbc4.jar
diff --git a/debian/control b/debian/control
index 1e2de74..2a44876 100644
--- a/debian/control
+++ b/debian/control
@@ -6,10 +6,13 @@ Uploaders:
Matthias Klose <doko at ubuntu.com>,
Andrew Ross <ubuntu at rossfamily.co.uk>
Build-Depends:
- ant,
debhelper (>= 10),
- javahelper (>=0.32~),
- maven-repo-helper (>= 1.7.1)
+ libbuild-helper-maven-plugin-java,
+ libcomment-preprocessor-java,
+ libmaven-bundle-plugin-java,
+ libmaven-javadoc-plugin-java,
+ libproperties-maven-plugin-java,
+ maven-debian-helper
Build-Depends-Indep:
default-jdk,
default-jdk-doc,
@@ -21,8 +24,8 @@ Homepage: http://jdbc.postgresql.org/
Package: libpostgresql-jdbc-java
Architecture: all
-Depends: ${java:Depends}, ${misc:Depends}
-Recommends: ${java:Recommends}
+Depends: ${maven:Depends}, ${misc:Depends}
+Recommends: ${maven:OptionalDepends}
Suggests: postgresql (>= 8.2)
Conflicts: libpgjava (<= 7.4.7-3), libpg-java (<= 9.1-901-1)
Provides: libpgjava, libpg-java
@@ -36,8 +39,8 @@ Description: Java database (JDBC) driver for PostgreSQL
Package: libpostgresql-jdbc-java-doc
Section: doc
Architecture: all
-Depends: ${java:Depends}, ${misc:Depends}
-Recommends: ${java:Recommends}
+Depends: ${maven:DocDepends}, ${misc:Depends}
+Recommends: ${maven:DocOptionalDepends}
Conflicts: libpg-java-doc (<= 8.4-702-1)
Provides: libpg-java-doc
Replaces: libpg-java-doc
diff --git a/debian/libpostgresql-jdbc-java-doc.install b/debian/libpostgresql-jdbc-java-doc.install
new file mode 100644
index 0000000..cbfa526
--- /dev/null
+++ b/debian/libpostgresql-jdbc-java-doc.install
@@ -0,0 +1 @@
+pgjdbc/target/site/apidocs/* usr/share/doc/libpostgresql-jdbc-java/api
diff --git a/debian/libpostgresql-jdbc-java-doc.javadoc b/debian/libpostgresql-jdbc-java-doc.javadoc
deleted file mode 100644
index a1f63ac..0000000
--- a/debian/libpostgresql-jdbc-java-doc.javadoc
+++ /dev/null
@@ -1 +0,0 @@
-build/publicapi /usr/share/doc/libpostgresql-jdbc-java-doc/api
diff --git a/debian/libpostgresql-jdbc-java.poms b/debian/libpostgresql-jdbc-java.poms
index f5a352d..c5b854c 100644
--- a/debian/libpostgresql-jdbc-java.poms
+++ b/debian/libpostgresql-jdbc-java.poms
@@ -1 +1,30 @@
-build/pom/pom.xml --has-package-version --java-lib --artifact=jars/postgresql*.jdbc4*.jar --relocate=postgresql:postgresql
+# 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
+pgjdbc/pom.xml --no-parent --has-package-version --java-lib --relocate=postgresql:postgresql
+ubenchmark/pom.xml --ignore
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..ed6d09d
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,8 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
+maven.test.skip=true
+
+waffleEnabled=false
+osgiEnabled=false
diff --git a/debian/patches/01-missing-pom-configuration.patch b/debian/patches/01-missing-pom-configuration.patch
new file mode 100644
index 0000000..ea871e5
--- /dev/null
+++ b/debian/patches/01-missing-pom-configuration.patch
@@ -0,0 +1,137 @@
+Description: Add the missing configuration inherited from the parent poms (not in Debian)
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/pgjdbc/pom.xml
++++ b/pgjdbc/pom.xml
+@@ -33,6 +33,20 @@
+ <jdbc.specification.version>4.2</jdbc.specification.version>
+ <jdbc.specification.version.nodot>42</jdbc.specification.version.nodot>
+ <skip.assembly>false</skip.assembly>
++
++ <!-- Properties from pgjdbc-versions 1.1.2 -->
++ <postgresql.driver.fullversion>PostgreSQL ${postgresql.jdbc.spec}</postgresql.driver.fullversion>
++ <postgresql.preprocessed.sources.directory>${project.build.directory}/gen-src</postgresql.preprocessed.sources.directory>
++ <postgresql.preprocessed.test.sources.directory>${project.build.directory}/gen-test-src</postgresql.preprocessed.test.sources.directory>
++ <unzip.jdk.ant.build.xml>${project.build.directory}/unzip-jdk-ant.xml</unzip.jdk.ant.build.xml>
++ <skip.unzip-jdk-src>true</skip.unzip-jdk-src>
++
++ <!-- Properties from pgjdbc-core-parent 1.1.2 -->
++ <template.default.pg.port>5432</template.default.pg.port>
++ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
++ <postgresql.jdbc.spec>JDBC${jdbc.specification.version}</postgresql.jdbc.spec>
++ <build.properties.relative.path>${basedir}/..</build.properties.relative.path>
++
+ </properties>
+
+ <profiles>
+@@ -240,6 +254,110 @@
+ <build>
+ <plugins>
+ <plugin>
++ <groupId>org.codehaus.mojo</groupId>
++ <artifactId>build-helper-maven-plugin</artifactId>
++ <executions>
++ <execution>
++ <phase>initialize</phase>
++ <id>parse-version</id>
++ <goals>
++ <goal>parse-version</goal>
++ </goals>
++ </execution>
++ </executions>
++ </plugin>
++ <plugin>
++ <groupId>org.codehaus.mojo</groupId>
++ <artifactId>properties-maven-plugin</artifactId>
++ <executions>
++ <execution>
++ <phase>initialize</phase>
++ <goals>
++ <goal>read-project-properties</goal>
++ </goals>
++ <configuration>
++ <files>
++ <file>${build.properties.relative.path}/build.properties</file>
++ <file>${build.properties.relative.path}/build.local.properties</file>
++ </files>
++ <quiet>true</quiet>
++ </configuration>
++ </execution>
++ </executions>
++ </plugin>
++ <plugin>
++ <groupId>com.igormaznitsa</groupId>
++ <artifactId>jcp</artifactId>
++ <executions>
++ <execution>
++ <id>preprocessSources</id>
++ <phase>generate-sources</phase>
++ <goals>
++ <goal>preprocess</goal>
++ </goals>
++ <configuration>
++ <!-- generated-sources is not used, otherwise IDEA picks sources from both src and generated-sources,
++ and produces lots of "duplicate class" errors -->
++ <destination>${postgresql.preprocessed.sources.directory}</destination>
++ <compareDestination>true</compareDestination>
++ </configuration>
++ </execution>
++ <execution>
++ <id>preprocessTestSources</id>
++ <phase>generate-test-sources</phase>
++ <goals>
++ <goal>preprocess</goal>
++ </goals>
++ <configuration>
++ <!-- generated-sources is not used, otherwise IDEA picks sources from both src and generated-sources,
++ and produces lots of "duplicate class" errors -->
++ <testDestination>${postgresql.preprocessed.test.sources.directory}</testDestination>
++ <compareDestination>true</compareDestination>
++ <useTestSources>true</useTestSources>
++ </configuration>
++ </execution>
++ </executions>
++ </plugin>
++ <plugin>
++ <groupId>org.apache.maven.plugins</groupId>
++ <artifactId>maven-jar-plugin</artifactId>
++ <configuration>
++ <archive>
++ <manifest>
++ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
++ </manifest>
++ <manifestEntries>
++ <Main-Class>org.postgresql.util.PGJDBCMain</Main-Class>
++ <Specification-Title>JDBC</Specification-Title>
++ <Specification-Version>${jdbc.specification.version}</Specification-Version>
++ <Specification-Vendor>Oracle Corporation</Specification-Vendor>
++ </manifestEntries>
++ <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
++ </archive>
++ </configuration>
++ </plugin>
++ <plugin>
++ <groupId>org.apache.felix</groupId>
++ <artifactId>maven-bundle-plugin</artifactId>
++ <extensions>true</extensions>
++ <configuration>
++ <instructions>
++ <Export-Package>org.postgresql*; version=${parsedVersion.osgiVersion}</Export-Package>
++ <Import-Package>javax.sql, javax.transaction.xa, javax.naming, *;resolution:=optional
++ </Import-Package>
++ <Bundle-Activator>org.postgresql.osgi.PGBundleActivator</Bundle-Activator>
++ <Bundle-SymbolicName>org.postgresql.jdbc${jdbc.specification.version.nodot}
++ </Bundle-SymbolicName>
++ <Bundle-Name>PostgreSQL JDBC Driver JDBC${jdbc.specification.version.nodot}
++ </Bundle-Name>
++ <Bundle-Copyright>Copyright (c) 2003-2015, PostgreSQL Global Development Group
++ </Bundle-Copyright>
++ <Require-Capability>osgi.ee;filter:="(&(|(osgi.ee=J2SE)(osgi.ee=JavaSE))(version>=${javac.target}))"
++ </Require-Capability>
++ </instructions>
++ </configuration>
++ </plugin>
++ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
diff --git a/debian/patches/classpath.patch b/debian/patches/classpath.patch
deleted file mode 100644
index 36689e9..0000000
--- a/debian/patches/classpath.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: Build the classpath from local jars instead of downloading them
-Author: Emmanuel Bourg <ebourg at apache.org>
-Forwarded: not-needed
---- a/build.xml
-+++ b/build.xml
-@@ -106,9 +106,9 @@
- <include name="${package}/xa/jdbc4/*.java" if="jdbc4any"/>
- </patternset>
-
-- <artifact:dependencies pathId="dependency.classpath" useScope="test">
-- <dependency groupId="junit" artifactId="junit" version="3.8.2" scope="test"/>
-- </artifact:dependencies>
-+ <path id="dependency.classpath">
-+ <pathelement path="/usr/share/java/junit.jar"/>
-+ </path>
-
- <target name="check_versions">
- <condition property="jdbc2">
diff --git a/debian/patches/link-javadoc.patch b/debian/patches/link-javadoc.patch
deleted file mode 100644
index a20c823..0000000
--- a/debian/patches/link-javadoc.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Modify the javadoc build process so it links against the JDK
-javadoc.
---- a/build.xml
-+++ b/build.xml
-@@ -525,6 +525,7 @@
- <include name="ds/common/BaseDataSource.java" />
- <include name="xa/PGXADataSource.java" />
- </fileset>
-+ <link href="/usr/share/doc/default-jdk-doc/api" />
- </javadoc>
- </target>
-
diff --git a/debian/patches/series b/debian/patches/series
index 95b5533..71c0d1c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
-link-javadoc.patch
-classpath.patch
+01-missing-pom-configuration.patch
diff --git a/debian/rules b/debian/rules
index 7aaa575..5210a93 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,8 @@
#!/usr/bin/make -f
%:
- dh $@ --with javahelper --with maven-repo-helper
+ dh $@
override_dh_auto_build:
- dh_auto_build -- -Dtarget=1.6 -Dsource=1.6 -Dssl=true jar publicapi release-version prepare-pom
+ dh_auto_build -- package
+ dh_auto_build -- javadoc:javadoc
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git
More information about the pkg-java-commits
mailing list