Author: markt Date: Thu Apr 20 09:31:26 2017 New Revision: 1792033 URL: http://svn.apache.org/viewvc?rev=1792033&view=rev Log: (empty)
Modified: tomcat/trunk/res/maven/mvn-pub.xml tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/res/maven/mvn-pub.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/maven/mvn-pub.xml?rev=1792033&r1=1792032&r2=1792033&view=diff ============================================================================== --- tomcat/trunk/res/maven/mvn-pub.xml (original) +++ tomcat/trunk/res/maven/mvn-pub.xml Thu Apr 20 09:31:26 2017 @@ -16,7 +16,8 @@ limitations under the License. --> <project name="Tomcat 9.0 Maven Deployment" default="" basedir="." - xmlns:artifact="urn:maven-artifact-ant"> + xmlns:artifact="urn:maven-artifact-ant" + xmlns:if="ant:if"> <!-- Built for using Maven Ant Tasks (version 2.1.0 is known to work) --> @@ -49,35 +50,18 @@ </copy> <!--sign the jar, the source and the pom --> - <exec executable="${gpg.exec}" failonerror="true" - inputstring="${gpg.passphrase}"> - <arg value="--batch"/> - <arg value="--passphrase-fd"/> - <arg value="0"/> - <arg value="-a"/> - <arg value="-b"/> - <arg value="${file}"/> - </exec> - <exec executable="${gpg.exec}" failonerror="true" - inputstring="${gpg.passphrase}"> - <arg value="--batch"/> - <arg value="--passphrase-fd"/> - <arg value="0"/> - <arg value="-a"/> - <arg value="-b"/> - <arg value="${src}"/> - </exec> - <exec executable="${gpg.exec}" failonerror="true" - inputstring="${gpg.passphrase}"> - <arg value="--batch"/> - <arg value="--passphrase-fd"/> - <arg value="0"/> - <arg value="-a"/> - <arg value="-b"/> - <arg value="-o"/> - <arg value="${pom}.asc"/> - <arg value="${pom}.tmp"/> - </exec> + <antcall target="-sign" > + <param name="file.in" value="${file}" /> + <param name="file.out" value="${file}.asc" /> + </antcall> + <antcall target="-sign" > + <param name="file.in" value="${src}" /> + <param name="file.out" value="${src}.asc" /> + </antcall> + <antcall target="-sign" > + <param name="file.in" value="${pom}.tmp" /> + <param name="file.out" value="${pom}.asc" /> + </antcall> <artifact:deploy file="${file}"> <pom file="${pom}.tmp"/> @@ -85,10 +69,10 @@ <authentication username="${asf.ldap.username}" password="${asf.ldap.password}"/> </remoteRepository> - <attach file="${file}.asc" type="jar.asc"/> + <attach file="${file}.asc" type="jar.asc" if:set="gpg.passphrase"/> <attach file="${src}" classifier="sources" type="jar"/> - <attach file="${src}.asc" classifier="sources" type="jar.asc"/> - <attach file="${pom}.asc" type="pom.asc"/> + <attach file="${src}.asc" classifier="sources" type="jar.asc" if:set="gpg.passphrase"/> + <attach file="${pom}.asc" type="pom.asc" if:set="gpg.passphrase"/> </artifact:deploy> <delete file="${pom}.tmp"/> @@ -131,26 +115,14 @@ </copy> <!--sign the file and pom --> - <exec executable="${gpg.exec}" failonerror="true" - inputstring="${gpg.passphrase}"> - <arg value="--batch"/> - <arg value="--passphrase-fd"/> - <arg value="0"/> - <arg value="-a"/> - <arg value="-b"/> - <arg value="${file}"/> - </exec> - <exec executable="${gpg.exec}" failonerror="true" - inputstring="${gpg.passphrase}"> - <arg value="--batch"/> - <arg value="--passphrase-fd"/> - <arg value="0"/> - <arg value="-a"/> - <arg value="-b"/> - <arg value="-o"/> - <arg value="${pom}.asc"/> - <arg value="${pom}.tmp"/> - </exec> + <antcall target="-sign" > + <param name="file.in" value="${file}" /> + <param name="file.out" value="${file}.asc" /> + </antcall> + <antcall target="-sign" > + <param name="file.in" value="${pom}.tmp" /> + <param name="file.out" value="${pom}.asc" /> + </antcall> <artifact:deploy file="${file}"> <pom file="${pom}.tmp"/> @@ -158,8 +130,8 @@ <authentication username="${asf.ldap.username}" password="${asf.ldap.password}"/> </remoteRepository> - <attach file="${file}.asc" type="jar.asc"/> - <attach file="${pom}.asc" type="pom.asc"/> + <attach file="${file}.asc" type="jar.asc" if:set="gpg.passphrase"/> + <attach file="${pom}.asc" type="pom.asc" if:set="gpg.passphrase"/> </artifact:deploy> <delete file="${pom}.tmp"/> @@ -198,35 +170,18 @@ </copy> <!--sign the zip, the tar.gz and the pom --> - <exec executable="${gpg.exec}" failonerror="true" - inputstring="${gpg.passphrase}"> - <arg value="--batch"/> - <arg value="--passphrase-fd"/> - <arg value="0"/> - <arg value="-a"/> - <arg value="-b"/> - <arg value="${file}.zip"/> - </exec> - <exec executable="${gpg.exec}" failonerror="true" - inputstring="${gpg.passphrase}"> - <arg value="--batch"/> - <arg value="--passphrase-fd"/> - <arg value="0"/> - <arg value="-a"/> - <arg value="-b"/> - <arg value="${file}.tar.gz"/> - </exec> - <exec executable="${gpg.exec}" failonerror="true" - inputstring="${gpg.passphrase}"> - <arg value="--batch"/> - <arg value="--passphrase-fd"/> - <arg value="0"/> - <arg value="-a"/> - <arg value="-b"/> - <arg value="-o"/> - <arg value="${pom}.asc"/> - <arg value="${pom}.tmp"/> - </exec> + <antcall target="-sign" > + <param name="file.in" value="${file}.zip" /> + <param name="file.out" value="${file}.zip.asc" /> + </antcall> + <antcall target="-sign" > + <param name="file.in" value="${file}.tar.gz" /> + <param name="file.out" value="${file}.tar.gz.asc" /> + </antcall> + <antcall target="-sign" > + <param name="file.in" value="${pom}.tmp" /> + <param name="file.out" value="${pom}.asc" /> + </antcall> <artifact:deploy file="${pom}"> <pom file="${pom}.tmp"/> @@ -235,10 +190,10 @@ password="${asf.ldap.password}"/> </remoteRepository> <attach file="${file}.zip" type="zip"/> - <attach file="${file}.zip.asc" type="zip.asc"/> + <attach file="${file}.zip.asc" type="zip.asc" if:set="gpg.passphrase"/> <attach file="${file}.tar.gz" type="tar.gz"/> - <attach file="${file}.tar.gz.asc" type="tar.gz.asc"/> - <attach file="${pom}.asc" type="pom.asc"/> + <attach file="${file}.tar.gz.asc" type="tar.gz.asc" if:set="gpg.passphrase"/> + <attach file="${pom}.asc" type="pom.asc" if:set="gpg.passphrase"/> </artifact:deploy> <delete file="${pom}.tmp"/> @@ -262,7 +217,7 @@ </sequential> </macrodef> - <target name="generic-deploy" depends="init-maven,init-gpg,init-ldap"> + <target name="generic-deploy" depends="init-maven,init-gpg-1,init-gpg-2,init-ldap"> <!-- Standard jars in bin directory --> <!-- Skip bootstrap.jar - it is just a subset of catalina.jar --> <doMavenDeploy artifactId="tomcat-juli" @@ -399,7 +354,11 @@ </antcall> </target> - <target name="init-gpg"> + <target name="init-gpg-1"> + <available file="${gpg.exec}" property="gpg.exec.available"/> + </target> + + <target name="init-gpg-2" if="${gpg.exec.available}"> <input message="Enter GPG pass-phrase" addproperty="gpg.passphrase" > <handler type="secure"/> </input> @@ -412,4 +371,19 @@ </input> </target> + <target name="-sign" if="gpg.passphrase"> + <fail unless="file" /> + <exec executable="${gpg.exec}" failonerror="true" + inputstring="${gpg.passphrase}"> + <arg value="--batch"/> + <arg value="--passphrase-fd"/> + <arg value="0"/> + <arg value="-a"/> + <arg value="-b"/> + <arg value="-o"/> + <arg value="${file.out}"/> + <arg value="${file.in}"/> + </exec> + </target> + </project> Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1792033&r1=1792032&r2=1792033&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Thu Apr 20 09:31:26 2017 @@ -90,6 +90,16 @@ </add> </changelog> </subsection> + <subsection name="Other"> + <changelog> + <add> + Modify the Ant build script used to publish to a Maven repository so + that it no longer requires artifacts to be GPG signed. This is make it + possible for the CI system to upload snapshot builds to the ASF Maven + repository. (markt) + </add> + </changelog> + </subsection> </section> <section name="Tomcat 9.0.0.M20 (markt)" rtext="2017-04-18"> <subsection name="Catalina"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org