diff options
| author | Robert Gemmell <robbie@apache.org> | 2011-04-19 11:24:31 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2011-04-19 11:24:31 +0000 |
| commit | 39edbbb95807d9775d7c54044e859115cb904774 (patch) | |
| tree | 5908af71c2df5683ce61aed709d228ad3562f50b /qpid/java/upload.xml | |
| parent | 6c904379b3ba82dd5d5b46723363f51e5770e17f (diff) | |
| download | qpid-python-39edbbb95807d9775d7c54044e859115cb904774.tar.gz | |
QPID-3213: add ant+ivy task for uploading the client+common mavent artifacts to a staging repo in the ASF Nexus instance
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1095038 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/upload.xml')
| -rw-r--r-- | qpid/java/upload.xml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/qpid/java/upload.xml b/qpid/java/upload.xml new file mode 100644 index 0000000000..abc58d9f97 --- /dev/null +++ b/qpid/java/upload.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!-- + 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. +--> +<project name="upload" default="upload" xmlns:ivy="antlib:org.apache.ivy.ant"> + <description>Targets for uploading releases to ASF's Nexus instance</description> + + <property name="nexus.organisation" value="org.apache"/> + <property name="nexus.host" value="repository.apache.org"/> + <property name="nexus.upload.url" value="https://repository.apache.org/service/local/staging/deploy/maven2"/> + + <!-- properties for downloading ivy if required --> + <property name="ivy.jar.dir" value="lib/ivy" /> + <property name="ivy.install.version" value="2.2.0" /> + <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy-${ivy.install.version}.jar" /> + <property name="ivy.repo.url" value="http://repo1.maven.org/maven2/org/apache/ivy/ivy"/> + + <target name="download-ivy"> + <mkdir dir="${ivy.jar.dir}"/> + <!-- download Ivy from web site so that it can be used without any special installation --> + <echo message="Downloading ivy..."/> + <get src="${ivy.repo.url}/${ivy.install.version}/ivy-${ivy.install.version}.jar" + dest="${ivy.jar.file}" usetimestamp="true"/> + </target> + + <target name="load-ivy"> + <!-- Try to load Ivy from local ivy dir, in case the user has not already dropped it into + Ant's lib dir (note that the latter copy will always take precedence). Won't + fail so long as Ivy is in at least one of the locations. --> + <mkdir dir="${ivy.jar.dir}"/> + <path id="ivy.lib.path"> + <fileset dir="${ivy.jar.dir}" includes="*.jar"/> + </path> + <taskdef resource="org/apache/ivy/ant/antlib.xml" + uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/> + </target> + + <!-- check the following properties which must be specified by the user--> + <target name="check-props-exist" description="check that the required properties have been set"> + <fail unless="nexus.user" message="You must supply the 'nexus.user' property"/> + <fail unless="nexus.password" message="You must supply the 'nexus.password' property"/> + <fail unless="maven.artifact.dir" message="You must supply the 'maven.artifact.dir' property"/> + </target> + + <target name="perform-nexus-upload" description="really requires the prepare-upload target to be run first"> + <ivy:configure file="ivysettings-nexus.xml"/> + <ivy:resolve file="ivy.xml"/> + <ivy:retrieve/> + <ivy:deliver/> + <ivy:publish publishivy="false" resolver="nexus" + artifactspattern="${maven.artifact.dir}/[organisation]/[module]/[artifact]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/> + </target> + + <target name="upload" depends="load-ivy, check-props-exist, perform-nexus-upload"/> +</project> |
