You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by us...@apache.org on 2010/02/20 15:04:01 UTC
svn commit: r912115 - in /lucene/java/trunk: build.xml common-build.xml
Author: uschindler
Date: Sat Feb 20 14:04:01 2010
New Revision: 912115
URL: http://svn.apache.org/viewvc?rev=912115&view=rev
Log:
LUCENE-2267: Add support for gpg signing to build.xml
Modified:
lucene/java/trunk/build.xml
lucene/java/trunk/common-build.xml
Modified: lucene/java/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/build.xml?rev=912115&r1=912114&r2=912115&view=diff
==============================================================================
--- lucene/java/trunk/build.xml (original)
+++ lucene/java/trunk/build.xml Sat Feb 20 14:04:01 2010
@@ -550,6 +550,48 @@
</target>
<!-- ================================================================== -->
+ <!-- support for signing the artifacts using gpg -->
+ <!-- ================================================================== -->
+ <target name="clean-dist-signatures">
+ <delete failonerror="false">
+ <fileset dir="${dist.dir}">
+ <include name="**/*.asc"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="sign-artifacts" depends="clean-dist-signatures">
+ <available property="gpg.input.handler" classname="org.apache.tools.ant.input.SecureInputHandler"
+ value="org.apache.tools.ant.input.SecureInputHandler"/>
+ <!--else:--><property name="gpg.input.handler" value="org.apache.tools.ant.input.DefaultInputHandler"/>
+ <input message="Enter GPG keystore password: >" addproperty="gpg.passphrase">
+ <handler classname="${gpg.input.handler}" />
+ </input>
+
+ <apply executable="${gpg.exe}" inputstring="${gpg.passphrase}"
+ dest="${dist.dir}" type="file" maxparallel="1" verbose="yes">
+ <arg value="--passphrase-fd"/>
+ <arg value="0"/>
+ <arg value="--batch"/>
+ <arg value="--armor"/>
+ <arg value="--default-key"/>
+ <arg value="${gpg.key}"/>
+ <arg value="--output"/>
+ <targetfile/>
+ <arg value="--detach-sig"/>
+ <srcfile/>
+
+ <fileset dir="${dist.dir}">
+ <include name="**/*.jar"/>
+ <include name="**/*.zip"/>
+ <include name="**/*.tar.gz"/>
+ <include name="**/*.pom"/>
+ </fileset>
+ <globmapper from="*" to="*.asc"/>
+ </apply>
+ </target>
+
+ <!-- ================================================================== -->
<!-- Build the JavaCC files into the source tree -->
<!-- ================================================================== -->
<target name="jjdoc">
Modified: lucene/java/trunk/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/common-build.xml?rev=912115&r1=912114&r2=912115&view=diff
==============================================================================
--- lucene/java/trunk/common-build.xml (original)
+++ lucene/java/trunk/common-build.xml Sat Feb 20 14:04:01 2010
@@ -113,6 +113,9 @@
<property name="svnversion.exe" value="svnversion" />
<property name="svn.exe" value="svn" />
+ <property name="gpg.exe" value="gpg" />
+ <property name="gpg.key" value="CODE SIGNING KEY" />
+
<condition property="build-1-5-contrib">
<equals arg1="1.5" arg2="${ant.java.version}" />
</condition>