Author: markt
Date: Thu Apr 20 10:38:33 2017
New Revision: 1792038

URL: http://svn.apache.org/viewvc?rev=1792038&view=rev
Log:
Additional tweaks to pick up credentials from the settings.xml used by the CI 
system.

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=1792038&r1=1792037&r2=1792038&view=diff
==============================================================================
--- tomcat/trunk/res/maven/mvn-pub.xml (original)
+++ tomcat/trunk/res/maven/mvn-pub.xml Thu Apr 20 10:38:33 2017
@@ -17,7 +17,8 @@
 -->
 <project name="Tomcat 9.0 Maven Deployment" default="" basedir="."
          xmlns:artifact="urn:maven-artifact-ant"
-         xmlns:if="ant:if">
+         xmlns:if="ant:if"
+         xmlns:unless="ant:unless">
   <!--
     Built for using Maven Ant Tasks (version 2.1.0 is known to work)
   -->
@@ -64,15 +65,16 @@
     </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" if:set="gpg.passphrase"/>
-        <attach file="${src}" classifier="sources" type="jar"/>
-        <attach file="${src}.asc" classifier="sources" type="jar.asc" 
if:set="gpg.passphrase"/>
-        <attach file="${pom}.asc" type="pom.asc" if:set="gpg.passphrase"/>
+      <pom file="${pom}.tmp"/>
+      <remoteRepository id="${maven.repo.repositoryId}" 
url="${maven.repo.url}">
+        <authentication username="${asf.ldap.username}"
+                        password="${asf.ldap.password}"
+                        unless:set="maven.auth.useSettings" />
+      </remoteRepository>
+      <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" 
if:set="gpg.passphrase"/>
+      <attach file="${pom}.asc" type="pom.asc" if:set="gpg.passphrase"/>
     </artifact:deploy>
 
     <delete file="${pom}.tmp"/>
@@ -126,9 +128,10 @@
 
     <artifact:deploy file="${file}">
       <pom file="${pom}.tmp"/>
-      <remoteRepository url="${maven.repo.url}" layout="default" >
+      <remoteRepository id="${maven.repo.repositoryId}" 
url="${maven.repo.url}">
         <authentication username="${asf.ldap.username}"
-                        password="${asf.ldap.password}"/>
+                        password="${asf.ldap.password}"
+                        unless:set="maven.auth.useSettings"/>
       </remoteRepository>
       <attach file="${file}.asc" type="jar.asc" if:set="gpg.passphrase"/>
       <attach file="${pom}.asc" type="pom.asc" if:set="gpg.passphrase"/>
@@ -184,16 +187,17 @@
     </antcall>
 
     <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" if:set="gpg.passphrase"/>
-        <attach file="${file}.tar.gz" type="tar.gz"/>
-        <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"/>
+      <pom file="${pom}.tmp"/>
+        <remoteRepository id="${maven.repo.repositoryId}" 
url="${maven.repo.url}">
+        <authentication username="${asf.ldap.username}"
+                        password="${asf.ldap.password}"
+                        unless:set="maven.auth.useSettings"/>
+      </remoteRepository>
+      <attach file="${file}.zip" type="zip"/>
+      <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" 
if:set="gpg.passphrase"/>
+      <attach file="${pom}.asc" type="pom.asc" if:set="gpg.passphrase"/>
     </artifact:deploy>
 
     <delete file="${pom}.tmp"/>
@@ -364,7 +368,7 @@
     </input>
   </target>
 
-  <target name="init-ldap">
+  <target name="init-ldap" unless="maven.auth.useSettings">
     <input message="Enter ASF LDAP (same as svn) password"
            addproperty="asf.ldap.password" >
       <handler type="secure"/>

Modified: tomcat/trunk/res/maven/mvn.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/maven/mvn.properties.default?rev=1792038&r1=1792037&r2=1792038&view=diff
==============================================================================
--- tomcat/trunk/res/maven/mvn.properties.default (original)
+++ tomcat/trunk/res/maven/mvn.properties.default Thu Apr 20 10:38:33 2017
@@ -24,15 +24,19 @@
 #        running this script
 asf.ldap.username=<!-- YOUR APACHE LDAP USERNAME -->
 gpg.exec=C:/software/GNU/GnuPG/gpg.exe
+# Set this property to use the user name and password from the Maven
+# settings.xml file rather than from asf.ldap.username and prompting for the
+# associated password 
+# maven.auth.useSettings=Anything
 
 # ASF Snapshot Repository (hosted on Nexus)
 
maven.snapshot.repo.url=https://repository.apache.org/content/repositories/snapshots
-maven.snapshot.repo.repositoryId=apache.snapshots
+maven.snapshot.repo.repositoryId=apache.snapshots.https
 
 # 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.repo.repositoryId=apache.releases.https
 
 # Release version info
 maven.asf.release.deploy.version=9.0.0.M21



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

Reply via email to