diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build/maven/maven-deploy.xml | 104 |
1 files changed, 102 insertions, 2 deletions
diff --git a/src/build/maven/maven-deploy.xml b/src/build/maven/maven-deploy.xml index 1137481a59..166cbe21ee 100644 --- a/src/build/maven/maven-deploy.xml +++ b/src/build/maven/maven-deploy.xml @@ -27,6 +27,7 @@ <!-- Add our maven ant tasks --> <path id="maven-ant-tasks.classpath" path="maven-ant-tasks-2.1.1.jar" /> <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" /> + <!-- simplify fixing pom versions --> <macrodef name="make-pom"> <attribute name="name" /> @@ -134,8 +135,7 @@ </sequential> </macrodef> - - <!-- Deploy compiler plugins --> + <!-- Deploy compiler plugins --> <macrodef name="deploy-remote-plugin"> <attribute name="name" /> <attribute name="version" /> @@ -172,6 +172,98 @@ <deploy-remote-plugin name="continuations" version="@{version}" repository="@{repository}"/> </sequential> </macrodef> + + <!-- PGP Signed deployment --> + <macrodef name="deploy-remote-signed-single"> + <attribute name="pom" /> + <attribute name="repository" /> + <attribute name="jar" /> + <element name="extra-args" optional="yes" /> + <sequential> + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" /> + <arg value="-Durl=@{repository}" /> + <arg value="-DrepositoryId=${repository.credentials.id}" /> + <arg value="-DpomFile=@{pom}" /> + <arg value="-Dfile=@{jar}" /> + <arg value="-Pgpg" /> + <arg value="-Dgpg.useagent=true" /> + <extra-args/> + </artifact:mvn> + </sequential> + </macrodef> + <macrodef name="deploy-remote-signed"> + <attribute name="name" /> + <attribute name="repository" /> + <attribute name="version" /> + <element name="extra-attachments" optional="yes" /> + <sequential> + <make-pom name="@{name}" version="@{version}" /> + <deploy-remote-signed-single + pom="@{name}/@{name}-pom-fixed.xml" + repository="@{repository}" + jar="/@{name}/@{name}.jar" /> + <deploy-remote-signed-single + pom="@{name}/@{name}-pom-fixed.xml" + repository="@{repository}" + jar="@{name}/@{name}-src.jar"> + <extra-args> + <arg value="-Dclassifier=sources" /> + </extra-args> + </deploy-remote-signed-single> + <deploy-remote-signed-single + pom="@{name}/@{name}-pom-fixed.xml" + repository="@{repository}" + jar="@{name}/@{name}-docs.jar"> + <extra-args> + <arg value="-Dclassifier=javadoc" /> + </extra-args> + </deploy-remote-signed-single> + </sequential> + </macrodef> + <macrodef name="deploy-remote-plugin-signed"> + <attribute name="name" /> + <attribute name="repository" /> + <attribute name="version" /> + <element name="extra-attachments" optional="yes" /> + <sequential> + <make-pom-plugin name="@{name}" version="@{version}" /> + <deploy-remote-signed-single + pom="plugins/@{name}/@{name}-pom-fixed.xml" + repository="@{repository}" + jar="plugins/@{name}/@{name}.jar" /> + <deploy-remote-signed-single + pom="plugins/@{name}/@{name}-pom-fixed.xml" + repository="@{repository}" + jar="plugins/@{name}/@{name}-src.jar"> + <extra-args> + <arg value="-Dclassifier=sources" /> + </extra-args> + </deploy-remote-signed-single> + <deploy-remote-signed-single + pom="plugins/@{name}/@{name}-pom-fixed.xml" + repository="@{repository}" + jar="plugins/@{name}/@{name}-docs.jar"> + <extra-args> + <arg value="-Dclassifier=javadoc" /> + </extra-args> + </deploy-remote-signed-single> + </sequential> + </macrodef> + <macrodef name="deploy-remote-signed-all"> + <attribute name="repository" /> + <attribute name="version" /> + <sequential> + <deploy-remote-plugin-signed name="continuations" version="@{version}" repository="@{repository}"/> + <deploy-remote-signed name="scala-library" version="@{version}" repository="@{repository}"/> + <deploy-remote-signed name="jline" version="@{version}" repository="@{repository}"/> + <deploy-remote-signed name="scala-compiler" version="@{version}" repository="@{repository}" /> + <deploy-remote-signed name="scala-dbc" version="@{version}" repository="@{repository}" /> + <deploy-remote-signed name="scala-swing" version="@{version}" repository="@{repository}"/> + <deploy-remote-signed name="scalap" version="@{version}" repository="@{repository}"/> + <deploy-remote-signed name="scala-partest" version="@{version}" repository="@{repository}"/> + </sequential> + </macrodef> </target> <!-- Local Targets --> @@ -184,6 +276,14 @@ </target> <!-- Remote Targets --> + <target name="deploy.signed.snapshot" depends="deploy.remote.init" description="Deploys the bundled files as a snapshot into the desired remote Maven repository"> + <deploy-remote-signed-all version="${maven.snapshot.version.number}" repository="${remote.snapshot.repository}" /> + </target> + + <target name="deploy.signed.release" depends="deploy.remote.init" description="Deploys the bundled files as a release into the desired remote Maven repository"> + <deploy-remote-signed-all version="${version.number}" repository="${remote.release.repository}" /> + </target> + <target name="deploy.snapshot" depends="deploy.remote.init" description="Deploys the bundled files as a snapshot into the desired remote Maven repository"> <deploy-remote-all version="${maven.snapshot.version.number}" repository="${remote.snapshot.repository}" /> </target> |