diff options
author | Robert Gemmell <robbie@apache.org> | 2012-11-11 19:46:53 +0000 |
---|---|---|
committer | Robert Gemmell <robbie@apache.org> | 2012-11-11 19:46:53 +0000 |
commit | 7b0aed9ebcf48f5c5458b35bf1e0f575560c9c09 (patch) | |
tree | d8f4718b3ad74122ef44467cfe8a1cd0ce90ff41 | |
parent | bf0d1076789644dc11ff5be6ca8a3db4fd2049d8 (diff) | |
download | qpid-python-7b0aed9ebcf48f5c5458b35bf1e0f575560c9c09.tar.gz |
QPID-4431: add 'deploy-snapshot' target for use in publishing snapshot maven artefacts from CI
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1408100 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/java/build.xml | 4 | ||||
-rw-r--r-- | qpid/java/common.xml | 4 | ||||
-rw-r--r-- | qpid/java/module.xml | 27 |
3 files changed, 32 insertions, 3 deletions
diff --git a/qpid/java/build.xml b/qpid/java/build.xml index 110d91852d..e3726d1c3c 100644 --- a/qpid/java/build.xml +++ b/qpid/java/build.xml @@ -77,6 +77,10 @@ <iterate target="release-mvn"/> </target> + <target name="deploy-snapshot" description="deploy snapshot artifacts to nexus"> + <iterate target="deploy-snapshot"/> + </target> + <target name="compile" description="compile sources"> <iterate target="compile"/> </target> diff --git a/qpid/java/common.xml b/qpid/java/common.xml index 2b61ef08c2..d0d5941be0 100644 --- a/qpid/java/common.xml +++ b/qpid/java/common.xml @@ -93,6 +93,10 @@ <property name="nexus.host" value="repository.apache.org"/> <property name="nexus.upload.url" value="https://${nexus.host}/service/local/staging/deploy/maven2"/> + <!-- properties for deplying snapshot artifacts --> + <property name="maven.snapshots.repo.id" value="apache.snapshots.https"/> + <property name="maven.snapshots.repo.url" value="https://${nexus.host}/content/repositories/snapshots"/> + <!-- properties for downloading ivy, and then our dependencies --> <property name="ivy.jar.dir" value="${project.root}/lib/ivy" /> <property name="ivy.install.version" value="2.2.0" /> diff --git a/qpid/java/module.xml b/qpid/java/module.xml index 594d1781be..4d7475829d 100644 --- a/qpid/java/module.xml +++ b/qpid/java/module.xml @@ -275,9 +275,7 @@ </jython> </target> - <target name="release-mvn" depends="pom" if="module.genpom" description="Install the artifacts into the local repository and prepare the release"> - <antcall target="build"/> - + <target name="release-mvn" depends="build,pom" if="module.genpom" description="Install the artifacts into the local repository and prepare the release artifacts"> <artifact:pom id="module.pom" file="${build.scratch}/qpid-${module.name}.pom"/> <artifact:install file="${module.jar}" pomRefId="module.pom" settingsFile="${maven.settings.xml}"> @@ -291,6 +289,29 @@ </artifact:deploy> </target> + <target name="deploy-snapshot" depends="build,pom" if="module.genpom" description="deploy a snapshot build to nexus"> + <!-- In order to use this target you need to have predefined a username and password for the + server with id ${maven.snapshots.repo.id} in your m2 settings file, e.g ~/.m2/settings.xml --> + <artifact:pom id="module.pom" file="${build.scratch}/qpid-${module.name}.pom"/> + + <fail message="The pom version must include -SNAPSHOT. Version found was: ${module.pom.version}"> + <condition> + <not> + <contains substring="-SNAPSHOT" string="${module.pom.version}" /> + </not> + </condition> + </fail> + + <artifact:install file="${module.jar}" pomRefId="module.pom" settingsFile="${maven.settings.xml}"> + <localRepository path="${maven.local.repo}"/> + </artifact:install> + + <artifact:deploy file="${module.jar}" pomRefId="module.pom"> + <localRepository path="${maven.local.repo}"/> + <remoteRepository id="${maven.snapshots.repo.id}" url="${maven.snapshots.repo.url}"/> + </artifact:deploy> + </target> + <target name="precompile"/> <target name="compile" depends="prepare,precompile" description="compile sources"> |