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 | dd8a7d4df603082d076e49e73ac459b9b3c9fb87 (patch) | |
| tree | 9ee14487ee2db90d6c79166581419739ff039a91 /java | |
| parent | 7a6ac448effd9361132747c8ddc5721315dd4dae (diff) | |
| download | qpid-python-dd8a7d4df603082d076e49e73ac459b9b3c9fb87.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/qpid@1408100 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/build.xml | 4 | ||||
| -rw-r--r-- | java/common.xml | 4 | ||||
| -rw-r--r-- | java/module.xml | 27 |
3 files changed, 32 insertions, 3 deletions
diff --git a/java/build.xml b/java/build.xml index 110d91852d..e3726d1c3c 100644 --- a/java/build.xml +++ b/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/java/common.xml b/java/common.xml index 2b61ef08c2..d0d5941be0 100644 --- a/java/common.xml +++ b/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/java/module.xml b/java/module.xml index 594d1781be..4d7475829d 100644 --- a/java/module.xml +++ b/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"> |
