[libpostgresql-jdbc-java] 48/93: Generate a non-Maven JAR filename using build-time version and JDBC API level.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:18:51 UTC 2017


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

ebourg-guest pushed a commit to annotated tag REL9_3_1102
in repository libpostgresql-jdbc-java.

commit 72fd3b4b6e1d494ec392873de9c3eaab81337fd6
Author: Stephen Nelson <stephen at eccostudio.com>
Date:   Tue Nov 12 21:29:01 2013 +0000

    Generate a non-Maven JAR filename using build-time version and JDBC API level.
---
 build.xml | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/build.xml b/build.xml
index ffe46e4..949fdd8 100644
--- a/build.xml
+++ b/build.xml
@@ -203,8 +203,9 @@
 
 
   <!-- create the jar file -->
-  <target name="jar" depends="compile">
-    <jar jarfile="${jardir}/postgresql.jar">
+  <target name="jar" depends="compile, artifact-version">
+    <property name="artifact.jar" value="${jardir}/${artifact.version.string}.jar"/>
+    <jar jarfile="${artifact.jar}">
       <fileset dir="${builddir}">
         <include name="${package}/**/*.class" />
       </fileset>
@@ -434,7 +435,7 @@
       <exclude name="${package}/test/ssl/**" unless="jdbc4tests" />
 
       <classpath>
-        <pathelement location="${jardir}/postgresql.jar"/>
+        <pathelement location="${artifact.jar}"/>
       </classpath>
     </javac>
     <jar jarfile="${jardir}/postgresql-tests.jar" basedir="${builddir}/tests"/>
@@ -464,7 +465,7 @@
       <sysproperty key="ssltest.properties" value="${ssltest.properties}" />
 
       <classpath>
-        <pathelement location="${jardir}/postgresql.jar" />
+        <pathelement location="${artifact.jar}" />
         <pathelement location="${jardir}/postgresql-tests.jar" />
         <pathelement path="${java.class.path}" />
       </classpath>
@@ -576,6 +577,11 @@
     </xmlvalidate>
   </target>
 
+  <target name="artifact-version" description="Sets the version string for the jar artifact">
+    <property name="artifact.version.string" value="${maven.artifact.id}-${maven.artifact.version}.${jdbc.version}" />
+    <echo message="Artifact version string: ${artifact.version.string}" />
+  </target>
+
   <target name="snapshot-version" description="Sets the version string to a snapshot version">
     <property name="maven.artifact.version.string" value="${maven.artifact.version}-${jdbc.version}-SNAPSHOT" />
     <echo message="Maven version string: ${maven.artifact.version.string}" />
@@ -645,7 +651,7 @@
   <!-- create jar files for distribution to maven central -->
   <target name="maven-jar" depends="jar, publicapi">
     <!-- Copy the built jar into a maven compatible name -->
-    <copy file="${jardir}/postgresql.jar" tofile="${maven.jar}"/>
+    <copy file="${artifact.jar}" tofile="${maven.jar}"/>
     <!-- Create a jar of the javadoc public api -->
     <jar jarfile="${maven.javadoc.jar}">
       <fileset dir="${builddir}/publicapi">

-- 
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