Author: markt Date: Mon Jan 7 15:19:20 2013 New Revision: 1429836 URL: http://svn.apache.org/viewvc?rev=1429836&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54361 Include the binary distributions when uploading artifacts to Maven repos
Added: tomcat/trunk/res/maven/tomcat.pom (with props) Modified: tomcat/trunk/res/maven/mvn-pub.xml tomcat/trunk/res/maven/mvn.properties.default Modified: tomcat/trunk/res/maven/mvn-pub.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/maven/mvn-pub.xml?rev=1429836&r1=1429835&r2=1429836&view=diff ============================================================================== --- tomcat/trunk/res/maven/mvn-pub.xml (original) +++ tomcat/trunk/res/maven/mvn-pub.xml Mon Jan 7 15:19:20 2013 @@ -34,21 +34,6 @@ </typedef> </target> - <target name="maven-deploy-nexus" depends="init-maven"> - <!--deploy it in nexus --> - <artifact:deploy file="${file}"> - <pom file="${pom}.tmp"/> - <remoteRepository url="${maven.repo.url}" layout="default"> - <authentication username="${asf.ldap.username}" - password="${asf.ldap.password}"/> - </remoteRepository> - <attach file="${file}.asc" type="jar.asc"/> - <attach file="${src}" classifier="sources" type="jar"/> - <attach file="${src}.asc" classifier="sources" type="jar.asc"/> - <attach file="${pom}.asc" type="pom.asc"/> - </artifact:deploy> - </target> - <target name="maven-deploy" depends="init-maven"> <!--cleanup--> <delete file="${pom}.tmp"/> @@ -91,12 +76,17 @@ <arg value="${pom}.tmp"/> </exec> - <!--deploy it--> - <antcall target="maven-deploy-nexus"> - <param name="file" value="${file}"/> - <param name="pom" value="${pom}"/> - <param name="src" value="${src}"/> - </antcall> + <artifact:deploy file="${file}"> + <pom file="${pom}.tmp"/> + <remoteRepository url="${maven.repo.url}" layout="default"> + <authentication username="${asf.ldap.username}" + password="${asf.ldap.password}"/> + </remoteRepository> + <attach file="${file}.asc" type="jar.asc"/> + <attach file="${src}" classifier="sources" type="jar"/> + <attach file="${src}.asc" classifier="sources" type="jar.asc"/> + <attach file="${pom}.asc" type="pom.asc"/> + </artifact:deploy> <delete file="${pom}.tmp"/> <delete file="${pom}.asc"/> @@ -137,7 +127,7 @@ </filterset> </copy> - <!--sign the jar and pom --> + <!--sign the file and pom --> <exec executable="${gpg.exec}" failonerror="true" inputstring="${gpg.passphrase}"> <arg value="--passphrase-fd"/> @@ -157,7 +147,6 @@ <arg value="${pom}.tmp"/> </exec> - <!--deploy it--> <artifact:deploy file="${file}"> <pom file="${pom}.tmp"/> <remoteRepository url="${maven.repo.url}" layout="default" > @@ -189,6 +178,82 @@ </sequential> </macrodef> + <target name="maven-deploy-binaries" depends="init-maven"> + <!--cleanup--> + <delete file="${pom}.tmp"/> + <delete file="${pom}.asc"/> + <delete file="${file}.zip.asc"/> + <delete file="${file}.tar.gz.asc"/> + + <!--replace the version in the pom--> + <copy file="${pom}" tofile="${pom}.tmp"> + <filterset> + <filter token="MAVEN.DEPLOY.VERSION" value="${maven.deploy.version}"/> + </filterset> + </copy> + + <!--sign the zip, the tar.gz and the pom --> + <exec executable="${gpg.exec}" failonerror="true" + inputstring="${gpg.passphrase}"> + <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="--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="--passphrase-fd"/> + <arg value="0"/> + <arg value="-a"/> + <arg value="-b"/> + <arg value="-o"/> + <arg value="${pom}.asc"/> + <arg value="${pom}.tmp"/> + </exec> + + <artifact:deploy file="${pom}"> + <pom file="${pom}.tmp"/> + <remoteRepository url="${maven.repo.url}" layout="default"> + <authentication username="${asf.ldap.username}" + password="${asf.ldap.password}"/> + </remoteRepository> + <attach file="${file}.zip" type="zip"/> + <attach file="${file}.zip.asc" type="zip.asc"/> + <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"/> + </artifact:deploy> + + <delete file="${pom}.tmp"/> + <delete file="${pom}.asc"/> + <delete file="${file}.zip.asc"/> + <delete file="${file}.tar.gz.asc"/> + </target> + + <macrodef name="doMavenDeployBinaries"> + <attribute name="artifactId"/> + <attribute name="groupId" default="org.apache.tomcat" /> + <attribute name="file" /> + <attribute name="pom" default="@{artifactId}.pom" /> + <sequential> + <antcall target="maven-deploy-binaries"> + <param name="file" value="@{file}"/> + <param name="groupId" value="@{groupId}"/> + <param name="artifactId" value="@{artifactId}"/> + <param name="pom" value="${tomcat.pom.path}/@{pom}"/> + </antcall> + </sequential> + </macrodef> + <target name="generic-deploy" depends="init-maven,init-gpg,init-ldap"> <!-- Standard jars in bin directory --> <!-- Skip bootstrap.jar - it is just a subset of catalina.jar --> @@ -292,6 +357,11 @@ pom="tomcat-embed-logging-log4j.pom" src="${tomcat.embed.src.path}/tomcat-embed-logging-log4j-src.jar"/> + <!-- Binaries --> + <doMavenDeployBinaries + artifactId="tomcat" + file="${tomcat.release.path}/v${maven.deploy.binary.version}/bin/apache-tomcat-${maven.deploy.binary.version}"/> + </target> <target name="deploy-snapshot"> @@ -300,6 +370,8 @@ value="${maven.snapshot.repo.repositoryId}"/> <param name="maven.repo.url" value="${maven.snapshot.repo.url}"/> <param name="maven.deploy.version" value="8.0-SNAPSHOT"/> + <param name="maven.deploy.binary.version" + value="${maven.asf.release.deploy.version}-dev"/> </antcall> </target> @@ -310,6 +382,8 @@ <param name="maven.repo.url" value="${maven.asf.release.repo.url}"/> <param name="maven.deploy.version" value="${maven.asf.release.deploy.version}"/> + <param name="maven.deploy.binary.version" + value="${maven.asf.release.deploy.version}"/> </antcall> </target> Modified: tomcat/trunk/res/maven/mvn.properties.default URL: http://svn.apache.org/viewvc/tomcat/trunk/res/maven/mvn.properties.default?rev=1429836&r1=1429835&r2=1429836&view=diff ============================================================================== --- tomcat/trunk/res/maven/mvn.properties.default (original) +++ tomcat/trunk/res/maven/mvn.properties.default Mon Jan 7 15:19:20 2013 @@ -40,6 +40,7 @@ maven.asf.release.deploy.version=8.0.0 #Where do we load the libraries from tomcat.lib.path=../../output/build/lib tomcat.bin.path=../../output/build/bin +tomcat.release.path=../../output/release tomcat.src.path=../../output/src-jars tomcat.embed.path=../../output/embed tomcat.embed.src.path=../../output/embed-src-jars Added: tomcat/trunk/res/maven/tomcat.pom URL: http://svn.apache.org/viewvc/tomcat/trunk/res/maven/tomcat.pom?rev=1429836&view=auto ============================================================================== --- tomcat/trunk/res/maven/tomcat.pom (added) +++ tomcat/trunk/res/maven/tomcat.pom Mon Jan 7 15:19:20 2013 @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat</artifactId> + <version>@MAVEN.DEPLOY.VERSION@</version> + <description>Binary distribution of Apache Tomcat</description> + <url>http://tomcat.apache.org/</url> + <licenses> + <license> + <name>Apache License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + <distribution>repo</distribution> + </license> + </licenses> +</project> Propchange: tomcat/trunk/res/maven/tomcat.pom ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org