ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r708665 - in /ant/ivy/core/branches/2.0.0-rc2: build-release.xml ivysettings-signtask.xml
Date Tue, 28 Oct 2008 20:36:31 GMT
Author: maartenc
Date: Tue Oct 28 13:36:31 2008
New Revision: 708665

URL: http://svn.apache.org/viewvc?rev=708665&view=rev
Log:
Added task to sign the artifacts.

Added:
    ant/ivy/core/branches/2.0.0-rc2/ivysettings-signtask.xml
Modified:
    ant/ivy/core/branches/2.0.0-rc2/build-release.xml

Modified: ant/ivy/core/branches/2.0.0-rc2/build-release.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.0-rc2/build-release.xml?rev=708665&r1=708664&r2=708665&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.0-rc2/build-release.xml (original)
+++ ant/ivy/core/branches/2.0.0-rc2/build-release.xml Tue Oct 28 13:36:31 2008
@@ -18,7 +18,8 @@
 -->
 <project name="IvyRelease" default="snapshot" 
 		xmlns:ivy="antlib:org.apache.ivy.ant"
-		xmlns:xooki="antlib:xooki">
+		xmlns:xooki="antlib:xooki"
+		xmlns:openpgp="antlib:org.apache.commons.openpgp.ant">
 	<import file="build.xml"/>
 	
 	<taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />
@@ -205,6 +206,57 @@
 		<input message="please enter status: (integration,milestone,release)" addproperty="status"/>
 	</target>
 	
+	<target name="sign" depends="init-ivy">
+		<ivy:settings id="sign.settingsId" file="ivysettings-signtask.xml" />
+		<ivy:cachepath organisation="org.apache.commons" settingsRef="sign.settingsId" transitive="false"
+				module="commons-openpgp" revision="1.0-SNAPSHOT" inline="true" pathid="openpgp.classpath"/>
+		<ivy:cachepath organisation="bouncycastle" settingsRef="sign.settingsId"
+				module="bcprov-jdk16" revision="140" inline="true" pathid="bouncycastle.bcprov.classpath"/>
+		
+		<!-- Didn't find the jdk1.6 bcpg dependency, using the jdk1.5 version instead -->
+		<ivy:cachepath organisation="bouncycastle" settingsRef="sign.settingsId" transitive="false"
+				module="bcpg-jdk15" revision="140" inline="true" pathid="bouncycastle.bcpg.classpath"/>
+		
+		<property file="${user.home}/ivybuild.properties" />
+		<input message="please enter your PGP password: " addproperty="pgp.password"/>
+		<input message="please enter your PGP keyId: " addproperty="pgp.keyId"/>
+		
+		<!--
+			For some reason, if we use the openpgp:signer task here directly, the bouncycastle security
+			provider cannot be loaded. If we launch it as a forked process everything works fine !?!
+		-->
+		<java classname="org.apache.tools.ant.launch.Launcher"
+				fork="true">
+			<classpath>
+				<fileset dir="${ant.home}" includes="**/*.jar" />
+				<path refid="bouncycastle.bcprov.classpath" />
+				<path refid="bouncycastle.bcpg.classpath" />
+				<path refid="openpgp.classpath" />
+			</classpath>
+			<arg line="-f build-release.xml" />
+			<arg line="sign-internal" />
+			<arg line="-Dpgp.password=${pgp.password}" />
+			<arg line="-Dpgp.keyId=${pgp.keyId}" />
+		</java>
+	</target>
+		
+	<target name="sign-internal">
+		<property file="build.properties" />
+		<taskdef resource="org/apache/commons/openpgp/ant/antlib.xml" uri="antlib:org.apache.commons.openpgp.ant"
/>
+		<openpgp:signer secring="${user.home}/.gnupg/secring.gpg"
+						pubring="${user.home}/.gnupg/pubring.gpg"
+						password="${pgp.password}" 
+						keyid="${pgp.keyId}"
+						asciiarmor="true">
+			<fileset dir="${distrib.dir}">
+				<include name="**/*.pom"/>
+				<include name="**/*.jar"/>
+				<include name="**/*.zip"/>
+				<include name="**/*.gz"/>
+			</fileset>
+		</openpgp:signer>
+	</target>
+	
 	<target name="prepare-snapshot" 
 	        depends="/localivy, clean-ivy-home, clean, clean-lib, snapshot-version, install,
clean-examples, coverage-report" />
 	<target name="snapshot" 

Added: ant/ivy/core/branches/2.0.0-rc2/ivysettings-signtask.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.0-rc2/ivysettings-signtask.xml?rev=708665&view=auto
==============================================================================
--- ant/ivy/core/branches/2.0.0-rc2/ivysettings-signtask.xml (added)
+++ ant/ivy/core/branches/2.0.0-rc2/ivysettings-signtask.xml Tue Oct 28 13:36:31 2008
@@ -0,0 +1,27 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivysettings>
+	<settings defaultResolver="default" />
+	<resolvers>
+		<chain name="default">
+			<ibiblio name="public" m2compatible="true" />
+			<ibiblio name="snapshot" m2compatible="true" root="http://people.apache.org/repo/m2-snapshot-repository"
/>
+		</chain>
+	</resolvers>
+</ivysettings>



Mime
View raw message