diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-11-08 13:40:12 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-11-08 13:40:12 -0800 |
commit | 0e7543e9e969354072ae29f9a091013880cc75e5 (patch) | |
tree | 0176d9739edfb6e6985a5d3c0eb95777c5f11f7a /src | |
parent | 2af25d797ed34997f0b08e5350774f19b32c6bdd (diff) | |
parent | cd563c13d47a388f5656f47f639d6dfda5ae245a (diff) | |
download | scala-0e7543e9e969354072ae29f9a091013880cc75e5.tar.gz scala-0e7543e9e969354072ae29f9a091013880cc75e5.tar.bz2 scala-0e7543e9e969354072ae29f9a091013880cc75e5.zip |
Merge pull request #3108 from adriaanm/faster-build
Faster PR validation
Diffstat (limited to 'src')
-rw-r--r-- | src/build/maven/maven-deploy.xml | 69 |
1 files changed, 47 insertions, 22 deletions
diff --git a/src/build/maven/maven-deploy.xml b/src/build/maven/maven-deploy.xml index 9e4215d297..7cff0b457e 100644 --- a/src/build/maven/maven-deploy.xml +++ b/src/build/maven/maven-deploy.xml @@ -6,6 +6,46 @@ SuperSabbus extension for deploying a distribution to Maven. THIS FILE IS MEANT TO BE RUN STANDALONE IN THE MAVEN "distpack" DIRECTORY </description> + <macrodef name="deploy-remote"> + <attribute name="jar" default=""/> + <attribute name="pom"/> + <element name="artifacts" implicit="true" optional="true"/> + <sequential> + <artifact:deploy file="@{jar}" settingsFile="${settings.file}"> + <artifact:remoteRepository url="${remote.repository}" id="${repository.credentials.id}" /> + <artifact:pom refid="@{pom}" /> + <artifacts/> + </artifact:deploy> + </sequential> + </macrodef> + + <macrodef name="deploy-local"> + <attribute name="jar" default=""/> + <attribute name="pom"/> + <element name="artifacts" implicit="true" optional="true"/> + <sequential> + <artifact:install file="@{jar}"> + <artifact:localRepository path="${local.repository}" id="${repository.credentials.id}" /> + <artifact:pom refid="@{pom}" /> + <artifacts/> + </artifact:install> + </sequential> + </macrodef> + + <macrodef name="deploy-to"> + <attribute name="jar" default=""/> + <attribute name="pom"/> + <attribute name="local"/> + <element name="artifacts" implicit="true" optional="true"/> + <sequential> + <if><equals arg1="@{local}" arg2="true"/><then> + <deploy-local jar="@{jar}" pom="@{pom}"> <artifacts/> </deploy-local> + </then><else> + <deploy-remote jar="@{jar}" pom="@{pom}"> <artifacts/> </deploy-remote> + </else></if> + </sequential> + </macrodef> + <macrodef name="deploy-one"> <attribute name="dir" default=""/> <attribute name="name" /> @@ -31,30 +71,15 @@ <artifact:pom id="@{name}.pom" file="${path}-pom-filtered.xml" /> <if><equals arg1="@{signed}" arg2="false"/><then> - <if><equals arg1="@{local}" arg2="false"/><then> - <artifact:deploy file="${path}.jar" settingsFile="${settings.file}"> - <artifact:remoteRepository url="${remote.repository}" id="${repository.credentials.id}" /> - <artifact:pom refid="@{name}.pom" /> + <if><isset property="docs.skip"/><then> + <deploy-to local="@{local}" jar="${path}.jar" pom="@{name}.pom"> <artifact:attach type="jar" file="${path}-src.jar" classifier="sources" /> - <artifact:attach type="jar" file="${path}-docs.jar" classifier="javadoc" /> - </artifact:deploy> + </deploy-to> </then><else> - <if><isset property="docs.skip"/><then> - <artifact:install file="${path}.jar"> - <artifact:localRepository path="${local.repository}" id="${repository.credentials.id}" /> - <artifact:pom refid="@{name}.pom" /> - <artifact:attach type="jar" file="${path}-src.jar" classifier="sources" /> - </artifact:install> - </then> - <else> - <artifact:install file="${path}.jar"> - <artifact:localRepository path="${local.repository}" id="${repository.credentials.id}" /> - <artifact:pom refid="@{name}.pom" /> - <artifact:attach type="jar" file="${path}-src.jar" classifier="sources" /> - <artifact:attach type="jar" file="${path}-docs.jar" classifier="javadoc" /> - </artifact:install> - </else> - </if> + <deploy-to local="@{local}" jar="${path}.jar" pom="@{name}.pom"> + <artifact:attach type="jar" file="${path}-src.jar" classifier="sources" /> + <artifact:attach type="jar" file="${path}-docs.jar" classifier="javadoc" /> + </deploy-to> </else></if> </then><else> <local name="repo"/> |