tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1350564 - in /tomcat/tc7.0.x/trunk/res/maven: README.txt mvn-pub.xml mvn.properties.default
Date Fri, 15 Jun 2012 10:32:55 GMT
Author: markt
Date: Fri Jun 15 10:32:55 2012
New Revision: 1350564

URL: http://svn.apache.org/viewvc?rev=1350564&view=rev
Log:
Simplify Maven publishing
- Use Nexus throughout
- Remove now unused scp related sections
- Prompt for passwords rather than reading them from a file

Modified:
    tomcat/tc7.0.x/trunk/res/maven/README.txt
    tomcat/tc7.0.x/trunk/res/maven/mvn-pub.xml
    tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default

Modified: tomcat/tc7.0.x/trunk/res/maven/README.txt
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/README.txt?rev=1350564&r1=1350563&r2=1350564&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/res/maven/README.txt (original)
+++ tomcat/tc7.0.x/trunk/res/maven/README.txt Fri Jun 15 10:32:55 2012
@@ -17,10 +17,23 @@
 
 $Id$
 
+General preparatations before any publishing
+1 - Download Maven Ant Tasks (version 2.1.0 is known to work) and place it in
+    this directory
+2 - Generate a standard Tomcat release (ant release)
+3 - Copy mvn.properties.default to mvn.properties and adjust it as necessary.
+    You will need to set asf.ldap.username and you'll probably need to set
+    gpg.exec
+    The other properties should be OK. NOte you;ll be prompted for your GPG
+    pass-phrase and LDAP password when the script runs
+
+To publish a snaphost do the following:
+1 - ant -f mvn-pub.xml deploy-snapshot
+    This populates https://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/
+
 To release do the following:
-1 - copy mvn.properties.default to mvn.properties and adjust it.
-2 - ant -f mvn-pub.xml deploy-release
-    that step creates a staging in https://repository.apache.org/index.html#stagingRepositories
-3 - check the upload and then close the repository
-4 - include the repository in the VOTE thread
-5 - in https://repository.apache.org/index.html#stagingRepositories release it
+1 - ant -f mvn-pub.xml deploy-release
+    that step creates a staging area in https://repository.apache.org/index.html#stagingRepositories
+2 - check the upload and then close the repository
+3 - include the repository in the VOTE thread
+4 - in https://repository.apache.org/index.html#stagingRepositories release it

Modified: tomcat/tc7.0.x/trunk/res/maven/mvn-pub.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/mvn-pub.xml?rev=1350564&r1=1350563&r2=1350564&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/res/maven/mvn-pub.xml (original)
+++ tomcat/tc7.0.x/trunk/res/maven/mvn-pub.xml Fri Jun 15 10:32:55 2012
@@ -15,74 +15,32 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<project name="Tomcat 7.0 Maven Deployment" default="" basedir="." xmlns:artifact="urn:maven-artifact-ant">
+<project name="Tomcat 7.0 Maven Deployment" default="" basedir="."
+         xmlns:artifact="urn:maven-artifact-ant">
   <!--
-    Built for using Maven Ant Tasks 2.0.10 - download to this directory
-    You'll also need to install jsch 0.1.42 and manually configure
-    wagon-ssh 1.0-beta-2 to use the updated jsch. This will also add a
-    requirement for jzlib 1.0.7
-  -->
-  <!--
-  Properties required to be set:
-  maven.repo.url - the URL of the repository, for example scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository
-  maven.repo.repositoryId - the id of the repository, for example apache.snapshots
-  maven.deploy.version - the version that the components will be deployed as, for example
@MAVEN.DEPLOY.VERSION@
-  tomcat.lib.path - the path to tomcat JAR files
-  tomcat.bin.path - the path to tomcat's bin directory (for other JAR files)
-  tomcat.pom.path - the path to the POM files
-
-  For passwordless upload you'll also need to set
-  maven.username        - YOUR APACHE LDAP USERNAME (ASF ID normally).
-  maven.password        - YOUR APACHE LDAP PASSWORD
-  maven.scp.username    - Your ASF ID
-  maven.scp.privateKey  - Path to your exported ssh key
-
-  All these can be defined by mvn.properties (and defaults are in mvn.properties.default)
-
-  To get a private key to work on Windows, I followed these steps
-  1. on a linux box execute 'ssh-keygen -t rsa'
-  2. same linux box execute 'cat id_rsa.pub >> authorized_keys' and 'cat id_rsa.pub
>> authorized_keys2'
-  3. Copy id_rsa and id_rsa.pub to my windows box
-  4. Import id_rsa into puttygen
-  5. export id_rsa from puttygen to OpenSSH key
-  6. The key you exported from puttygen is the one you reference from the <privateKey>
element
-  7. Manually create the %USERPROFILE%\.ssh directory
-  8. Manually add the %USERPROFILE%\.ssh\known_hosts file with the entry for the host
+    Built for using Maven Ant Tasks (version 2.1.0 is known to work)
   -->
+
   <property file="${basedir}/mvn.properties"/>
   <property file="${basedir}/mvn.properties.default"/>
   <property name="local.repo" value="${user.home}/.m2/repository"/>
 
   <target name="init-maven">
-    <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant">
+    <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
+             uri="urn:maven-artifact-ant">
       <classpath>
-        <pathelement location="${basedir}/maven-ant-tasks-2.0.10.jar" />
+        <pathelement location="${basedir}/maven-ant-tasks-2.1.0.jar" />
       </classpath>
     </typedef>
-    <artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-2"/>
   </target>
 
-  <target name="maven-deploy-nexus" depends="init-maven" if="nexus.set">
+  <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="${maven.username}" password="${maven.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-other" depends="init-maven" unless="nexus.set">
-    <!--deploy it in nexus -->
-    <artifact:deploy file="${file}">
-        <pom file="${pom}.tmp"/>
-        <remoteRepository url="${maven.repo.url}" layout="default">
-          <authentication username="${maven.scp.username}" privateKey="${maven.scp.privateKey}"
passphrase="${maven.scp.passphrase}"/>
-          <authentication username="${maven.username}" password="${maven.password}"/>
+          <authentication username="${asf.ldap.username}"
+                          password="${asf.ldap.password}"/>
         </remoteRepository>
         <attach file="${file}.asc" type="jar.asc"/>
         <attach file="${src}" classifier="sources" type="jar"/>
@@ -106,21 +64,24 @@
     </copy>
 
     <!--sign the jar, the source and the pom -->
-    <exec executable="${maven.gpg.exec}" failonerror="true" inputstring="${maven.gpg.passphrase}">
+    <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}"/>
     </exec>
-    <exec executable="${maven.gpg.exec}" failonerror="true" inputstring="${maven.gpg.passphrase}">
+    <exec executable="${gpg.exec}" failonerror="true"
+          inputstring="${gpg.passphrase}">
       <arg value="--passphrase-fd"/>
       <arg value="0"/>
       <arg value="-a"/>
       <arg value="-b"/>
       <arg value="${src}"/>
     </exec>
-    <exec executable="${maven.gpg.exec}" failonerror="true" inputstring="${maven.gpg.passphrase}">
+    <exec executable="${gpg.exec}" failonerror="true"
+          inputstring="${gpg.passphrase}">
       <arg value="--passphrase-fd"/>
       <arg value="0"/>
       <arg value="-a"/>
@@ -136,11 +97,6 @@
         <param name="pom" value="${pom}"/>
         <param name="src" value="${src}"/>
     </antcall>
-    <antcall target="maven-deploy-other">
-        <param name="file" value="${file}"/>
-        <param name="pom" value="${pom}"/>
-        <param name="src" value="${src}"/>
-    </antcall>
 
     <delete file="${pom}.tmp"/>
     <delete file="${pom}.asc"/>
@@ -182,14 +138,16 @@
     </copy>
 
     <!--sign the jar and pom -->
-    <exec executable="${maven.gpg.exec}" failonerror="true" inputstring="${maven.gpg.passphrase}">
+    <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}"/>
     </exec>
-    <exec executable="${maven.gpg.exec}" failonerror="true" inputstring="${maven.gpg.passphrase}">
+    <exec executable="${gpg.exec}" failonerror="true"
+          inputstring="${gpg.passphrase}">
       <arg value="--passphrase-fd"/>
       <arg value="0"/>
       <arg value="-a"/>
@@ -202,8 +160,9 @@
     <!--deploy it-->
     <artifact:deploy file="${file}">
       <pom file="${pom}.tmp"/>
-      <remoteRepository url="${maven.repo.url}" layout="default">
-        <authentication username="${maven.scp.username}" privateKey="${maven.scp.privateKey}"
passphrase="${maven.scp.passphrase}"/>
+      <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="${pom}.asc" type="pom.asc"/>
@@ -230,7 +189,7 @@
     </sequential>
   </macrodef>
 
-  <target name="generic-deploy" depends="init-maven">
+  <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 -->
     <doMavenDeploy artifactId="tomcat-juli"
@@ -335,31 +294,34 @@
 
   <target name="deploy-snapshot">
     <antcall target="generic-deploy">
-      <param name="maven.repo.repositoryId" value="${maven.snapshot.repo.repositoryId}"/>
+      <param name="maven.repo.repositoryId"
+             value="${maven.snapshot.repo.repositoryId}"/>
       <param name="maven.repo.url" value="${maven.snapshot.repo.url}"/>
       <param name="maven.deploy.version" value="7.0-SNAPSHOT"/>
     </antcall>
   </target>
 
-  <target name="deploy-staging">
-    <antcall target="generic-deploy">
-      <param name="maven.repo.repositoryId" value="${maven.release.repo.repositoryId}"/>
-      <param name="maven.repo.url" value="${maven.release.repo.url}"/>
-      <param name="maven.deploy.version" value="${maven.release.deploy.version}"/>
-    </antcall>
-  </target>
-
   <target name="deploy-release">
-    <property name="nexus.set" value="true"/>
     <antcall target="generic-deploy">
-      <param name="maven.repo.repositoryId" value="${maven.asf.release.repo.repositoryId}"/>
+      <param name="maven.repo.repositoryId"
+             value="${maven.asf.release.repo.repositoryId}"/>
       <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.version"
+             value="${maven.asf.release.deploy.version}"/>
     </antcall>
   </target>
 
-  <target name="help">
-    <echo>Help is on the way!</echo>
+  <target name="init-gpg">
+    <input message="Enter GPG pass-phrase" addproperty="gpg.passphrase" >
+      <handler type="secure"/>
+    </input>
+  </target>
+
+  <target name="init-ldap">
+    <input message="Enter ASF LDAP (same svn) password"
+           addproperty="asf.ldap.password" >
+      <handler type="secure"/>
+    </input>
   </target>
 
 </project>

Modified: tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default?rev=1350564&r1=1350563&r2=1350564&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default (original)
+++ tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default Fri Jun 15 10:32:55 2012
@@ -19,29 +19,23 @@
 # no need to change this file
 #
 
-#Maven properties
-maven.username=<!-- YOUR APACHE LDAP USERNAME -->
-maven.password=<!-- YOUR APACHE LDAP PASSWORD -->
-maven.scp.username=fhanik
-maven.scp.privateKey=${user.home}/.ssh/id_rsa.export
-maven.scp.passphrase=
-maven.gpg.exec=C:/software/GNU/GnuPG/gpg.exe
-maven.gpg.passphrase=*****
+# Authentication
+# Note: You will be prompted for your GPG passphrase and LDAP password when
+#        running this script
+asf.ldap.username=<!-- YOUR APACHE LDAP USERNAME -->
+gpg.exec=C:/software/GNU/GnuPG/gpg.exe
 
-#Maven snapshot properties
-maven.snapshot.repo.url=scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository
+# ASF Snapshot Repository (hosted on Nexus)
+maven.snapshot.repo.url=https://repository.apache.org/content/repositories/snapshots
 maven.snapshot.repo.repositoryId=apache.snapshots
 
-#Maven release properties for Tomcat staging
-maven.release.repo.url=scp://people.apache.org/www/tomcat.apache.org/dev/dist/m2-repository
-maven.release.repo.repositoryId=tomcat-staging
-maven.release.deploy.version=7.0.29
-
-#Maven release properties for the main ASF repo (staging in nexus)
+# ASF Release Repository (hosted on Nexus)
+# Note: Also used for staging releases prior to voting
 maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/deploy/maven2
 maven.asf.release.repo.repositoryId=apache.releases
-maven.asf.release.deploy.version=7.0.29
 
+# Release version info
+maven.asf.release.deploy.version=7.0.29
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message