]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
(1) add release-dist and related build targets; (2) update maven pom template to...
authorGlenn Adams <gadams@apache.org>
Fri, 5 Oct 2012 12:48:52 +0000 (12:48 +0000)
committerGlenn Adams <gadams@apache.org>
Fri, 5 Oct 2012 12:48:52 +0000 (12:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-1_1@1394486 13f79535-47bb-0310-9956-ffa450edef68

build.xml
lib/xmlgraphics-commons-1.5.jar
xmlgraphics-fop-pom-template.pom

index 9cf4f62710d5f2ef75fbe8f134a532db3f765e74..5ee0adf0898cb7c57605618b0cc11228d7e46346 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1250,23 +1250,110 @@ NOTE:
     <gzip zipfile="${name}-${version}-src.tar.gz" src="${name}-${version}-src.tar"/>
     <delete file="${name}-${version}-src.tar"/>
   </target>
+  <target name="release-dist" depends="dist" description="Generates the distribution package and signs the release">
+    <property name="bin.suffix" value="bin"/>
+    <input message="Passphrase for your default private key (attention: passphrase will be echoed in clear text on the display!)" addproperty="pwd"/>
+    <antcall target="md5">
+      <param name="sign.archive" value="${name}-${version}-src.zip"/>
+    </antcall>
+    <antcall target="sign-file">
+      <param name="sign.archive" value="${name}-${version}-src.zip"/>
+      <param name="pwd" value="${pwd}"/>
+    </antcall>
+    <antcall target="md5">
+      <param name="sign.archive" value="${name}-${version}-src.tar.gz"/>
+    </antcall>
+    <antcall target="sign-file">
+      <param name="sign.archive" value="${name}-${version}-src.tar.gz"/>
+      <param name="pwd" value="${pwd}"/>
+    </antcall>
+    <antcall target="md5">
+      <param name="sign.archive" value="${name}-${version}-${bin.suffix}.zip"/>
+    </antcall>
+    <antcall target="sign-file">
+      <param name="sign.archive" value="${name}-${version}-${bin.suffix}.zip"/>
+      <param name="pwd" value="${pwd}"/>
+    </antcall>
+    <antcall target="md5">
+      <param name="sign.archive" value="${name}-${version}-${bin.suffix}.tar.gz"/>
+    </antcall>
+    <antcall target="sign-file">
+      <param name="sign.archive" value="${name}-${version}-${bin.suffix}.tar.gz"/>
+      <param name="pwd" value="${pwd}"/>
+    </antcall>
+  </target>
+  <target name="md5">
+    <property name="md5.exec" value="md5sum"/>
+    <property name="md5.options" value=""/>
+    <exec executable="${md5.exec}" output="${sign.archive}.md5">
+      <arg line="${md5.options} ${sign.archive}"/>
+    </exec>
+  </target>
+  <target name="sign-file">
+    <property name="gpg.exec" value="gpg"/>
+    <property name="gpg.options" value="--armor --detach-sign --force-v3-sigs --batch --verbose --passphrase-fd 0"/>
+    <delete file="${sign.archive}.asc"/>
+    <exec executable="${gpg.exec}" inputstring="${pwd}">
+      <arg line="${gpg.options} ${sign.archive}"/>
+    </exec>
+  </target>
 <!-- =================================================================== -->
 <!-- Maven artifacts                                                     -->
 <!-- =================================================================== -->
   <target name="maven-artifacts" depends="jar-main, jar-sources, jar-javadocs" description="Builds a Maven artifact that can be uploaded to a Maven repository">
-    <filter token="version" value="${version}"/>
+    <filter  token="version" value="${version}"/>
     <mkdir dir="${build.dir}/maven"/>
     <copy file="${basedir}/xmlgraphics-fop-pom-template.pom" tofile="${build.dir}/maven/pom.xml" filtering="true"/>
-    <copy file="${build.dir}/${name}.jar" tofile="${build.dir}/maven/${name}-${version}.jar"/>
+    <copy file="${build.dir}/${name}.jar" tofile="${build.dir}/${name}-${version}.jar"/>
+    <fileset id="bundle-files" dir="${build.dir}">
+      <patternset>
+      <include name="${name}-${version}.jar"/>
+      <include name="${name}-${version}-sources.jar"/>
+      <include name="${name}-${version}-javadoc.jar"/>
+      </patternset>
+      <patternset>
+      <include name="maven/pom.xml"/>
+      </patternset>
+    </fileset>
+    <checksum algorithm="md5">
+      <fileset refid="bundle-files"/>
+    </checksum>
+    <checksum algorithm="sha1">
+      <fileset refid="bundle-files"/>
+    </checksum>
+    <input message="Passphrase for your default private key (attention: passphrase will be echoed in clear text on the display!)" addproperty="pwd"/>
+    <antcall target="sign-file">
+      <param name="sign.archive" value="${build.dir}/${name}-${version}.jar"/>
+      <param name="pwd" value="${pwd}"/>
+    </antcall>
+    <antcall target="sign-file">
+      <param name="sign.archive" value="${build.dir}/${name}-${version}-sources.jar"/>
+      <param name="pwd" value="${pwd}"/>
+    </antcall>
+    <antcall target="sign-file">
+      <param name="sign.archive" value="${build.dir}/${name}-${version}-javadoc.jar"/>
+      <param name="pwd" value="${pwd}"/>
+    </antcall>
+    <antcall target="sign-file">
+      <param name="sign.archive" value="${build.dir}/maven/pom.xml"/>
+      <param name="pwd" value="${pwd}"/>
+    </antcall>
     <jar jarfile="${build.dir}/${name}-${version}-bundle.jar">
       <manifest>
-        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
+        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}])"/>
       </manifest>
       <fileset dir="${build.dir}">
-        <include name="${name}-${version}-sources.jar"/>
-        <include name="${name}-${version}-javadoc.jar"/>
+        <patternset>
+          <include name="${name}-${version}.jar*"/>
+          <include name="${name}-${version}-sources.jar*"/>
+          <include name="${name}-${version}-javadoc.jar*"/>
+        </patternset>
+      </fileset>
+      <fileset dir="${build.dir}/maven">
+        <patternset>
+          <include name="pom.xml*"/>
+        </patternset>
       </fileset>
-      <fileset dir="${build.dir}/maven"/>
       <metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
     </jar>
     <move file="${build.dir}/${name}-${version}-bundle.jar" todir="${basedir}"/>
index 501c8c818b4ac1556be70516da184ab6c8138a19..daf2a56d45079a778f9dbbf9f4748e67a4c79a1c 100644 (file)
Binary files a/lib/xmlgraphics-commons-1.5.jar and b/lib/xmlgraphics-commons-1.5.jar differ
index efa30f67fbbc82dca207cad76a495b381cf6bf35..8ee442d5bd14154c1cd794b58351f76254f987c4 100644 (file)
@@ -75,7 +75,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <dependency>\r
       <groupId>org.apache.xmlgraphics</groupId>\r
       <artifactId>xmlgraphics-commons</artifactId>\r
-      <version>1.4</version>\r
+      <version>1.5</version>\r
     </dependency>\r
     <dependency>\r
       <groupId>org.apache.xmlgraphics</groupId>\r
@@ -132,12 +132,12 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <dependency>\r
       <groupId>org.apache.avalon.framework</groupId>\r
       <artifactId>avalon-framework-api</artifactId>\r
-      <version>4.3.1</version>\r
+      <version>4.2.0</version>\r
     </dependency>\r
    <dependency>\r
       <groupId>org.apache.avalon.framework</groupId>\r
       <artifactId>avalon-framework-impl</artifactId>\r
-      <version>4.3.1</version>\r
+      <version>4.2.0</version>\r
     </dependency>\r
    <dependency>\r
       <groupId>javax.servlet</groupId>\r