Author: bodewig
Date: Wed Jun 9 13:41:23 2010
New Revision: 953001
URL: http://svn.apache.org/viewvc?rev=953001&view=rev
Log:
first cut at providing nexus upload support for Antlibs based on Antoine's work
for Ant. Will be tested by compress-antlib release someday
Added:
ant/antlibs/common/trunk/ivysettings-nexus.xml
- copied unchanged from r952673, ant/core/trunk/release/ivysettings.xml
ant/antlibs/common/trunk/upload.xml
- copied, changed from r952673, ant/core/trunk/release/upload.xml
Modified:
ant/antlibs/common/trunk/build.xml
ant/antlibs/common/trunk/ivy.xml
Modified: ant/antlibs/common/trunk/build.xml
URL:
http://svn.apache.org/viewvc/ant/antlibs/common/trunk/build.xml?rev=953001&r1=953000&r2=953001&view=diff
==============================================================================
--- ant/antlibs/common/trunk/build.xml (original)
+++ ant/antlibs/common/trunk/build.xml Wed Jun 9 13:41:23 2010
@@ -34,6 +34,8 @@
<property name="build.classes" value="${build}/classes"/>
<property name="build.testclasses" value="${build}/test-classes"/>
<property name="build.lib" value="${build}/lib"/>
+ <property name="build.javarepository"
+ value="${build}/java-repository"/>
<property name="src.junit" location="src/tests/junit"/>
<property name="src.antunit" location="src/tests/antunit"/>
@@ -430,4 +432,36 @@
<target name="create-readable-documents"
depends="style-contributors,style-changes"/>
+
+ <!-- uploading of releases -->
+ <import file="${common.basedir}/upload.xml"/>
+
+ <target name="prepare-upload" depends="bindist">
+ <property name="upload.dir"
+
value="${build.javarepository}/org/apache/ant/${artifact.name}/${artifact.version}"/>
+ <mkdir dir="${upload.dir}"/>
+ <copy file="${jarname}" todir="${upload.dir}"/>
+ <copy file="${target.pom}" todir="${upload.dir}"/>
+ </target>
+
+ <target name="check-sigs" depends="prepare-upload">
+ <uptodate property="jar.sig.ok"
+ srcfile="${upload.dir}/${artifact.stub}.jar"
+ targetfile="${upload.dir}/${artifact.stub}.jar.asc"/>
+ <uptodate property="pom.sig.ok"
+ srcfile="${upload.dir}/${artifact.stub}.pom"
+ targetfile="${upload.dir}/${artifact.stub}.pom.asc"/>
+ <fail message="Your OpenPGP signature of the artifacts is too old or
missing">
+ <condition>
+ <not>
+ <and>
+ <isset property="jar.sig.ok"/>
+ <isset property="pom.sig.ok"/>
+ </and>
+ </not>
+ </condition>
+ </fail>
+ </target>
+
+ <target name="upload" depends="check-sigs,perform-nexus-upload"/>
</project>
Modified: ant/antlibs/common/trunk/ivy.xml
URL:
http://svn.apache.org/viewvc/ant/antlibs/common/trunk/ivy.xml?rev=953001&r1=953000&r2=953001&view=diff
==============================================================================
--- ant/antlibs/common/trunk/ivy.xml (original)
+++ ant/antlibs/common/trunk/ivy.xml Wed Jun 9 13:41:23 2010
@@ -28,7 +28,7 @@
<!-- ========================================================== -->
<target name="ivy-init"
depends="setup">
- <property name="ivy.organization" value="apache"/>
+ <property name="ivy.organization" value="org/apache"/>
<property name="target.ivy.xml"
location="${build.lib}/${artifact.stub}-ivy.xml"/>
<tstamp>
@@ -59,7 +59,7 @@
<echoxml file="${target.ivy.xml}">
<ivy-module version="1.3">
<info organization="${ivy.organization}"
- module="${artifact.name}"
+ module="ant"
revision="${artifact.version}"
publication="${publication.datetime}">
<license name="Apache Software License 2.0"
@@ -67,6 +67,12 @@
<ivy-author name="Apache Ant Development Team"
url="http://ant.apache.org/"/>
</info>
+ <publications>
+ <artifact name="${artifact.name}" type="pom" ext="pom"/>
+ <artifact name="${artifact.name}" type="pom.asc" ext="pom.asc"/>
+ <artifact name="${artifact.name}" type="jar" ext="jar"/>
+ <artifact name="${artifact.name}" type="jar.asc" ext="jar.asc"/>
+ </publications>
</ivy-module>
</echoxml>
</target>
Copied: ant/antlibs/common/trunk/upload.xml (from r952673,
ant/core/trunk/release/upload.xml)
URL:
http://svn.apache.org/viewvc/ant/antlibs/common/trunk/upload.xml?p2=ant/antlibs/common/trunk/upload.xml&p1=ant/core/trunk/release/upload.xml&r1=952673&r2=953001&rev=953001&view=diff
==============================================================================
--- ant/core/trunk/release/upload.xml (original)
+++ ant/antlibs/common/trunk/upload.xml Wed Jun 9 13:41:23 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,12 +16,25 @@
limitations under the License.
-->
<project name="upload" xmlns:ivy="antlib:org.apache.ivy.ant">
- <fail unless="upload.user" message="supply upload.user on the command line"/>
- <fail unless="upload.password" message="supply upload.password on the
command line"/>
- <property name="upload.url"
value="https://repository.apache.org/service/local/staging/deploy/maven2"/>
- <ivy:configure file="ivysettings.xml"/>
- <ivy:resolve file="ivy.xml"/>
- <ivy:retrieve/>
- <ivy:deliver/>
- <ivy:publish publishivy="false"
artifactspattern="${basedir}/../java-repository/[organisation]/[module]/[artifact]/[revision]/[artifact]-[revision].[ext]"
resolver="nexus"/>
+ <description>Targets for uploading releases to ASF's Nexus
+ instance</description>
+
+ <!-- where to upload the artifacts -->
+ <property name="upload.url"
+
value="https://repository.apache.org/service/local/staging/deploy/maven2"/>
+
+ <target name="perform-nexus-upload"
+ description="really requires the prepare-upload target to be run
first">
+ <fail unless="upload.user"
+ message="supply upload.user on the command line"/>
+ <fail unless="upload.password"
+ message="supply upload.password on the command line"/>
+ <ivy:configure file="ivysettings-nexus.xml"/>
+ <ivy:resolve file="${target.ivy.xml}"/>
+ <ivy:retrieve/>
+ <ivy:deliver/>
+ <ivy:publish publishivy="false"
+
artifactspattern="${build.javarepository}/[organisation]/[module]/[artifact]/[revision]/[artifact]-[revision].[ext]"
+ resolver="nexus"/>
+ </target>
</project>
\ No newline at end of file