geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [31/38] incubator-geode git commit: GEODE-781: Check for existence of settings.xml
Date Tue, 26 Jan 2016 19:38:54 GMT
GEODE-781: Check for existence of settings.xml

If the jenkins user does not have a settings.xml file the build
will fail.  This adds a check to only read values from the file
if it is present on the filesystem.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/42dd4a79
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/42dd4a79
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/42dd4a79

Branch: refs/heads/wan_cq_donation
Commit: 42dd4a79b8e2e60e9d05fd065c63da2247b86d5c
Parents: ed31351
Author: Anthony Baker <abaker@apache.org>
Authored: Mon Jan 25 11:40:38 2016 -0800
Committer: Anthony Baker <abaker@apache.org>
Committed: Mon Jan 25 12:38:58 2016 -0800

----------------------------------------------------------------------
 build.gradle | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/42dd4a79/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 4222275..28519dd 100755
--- a/build.gradle
+++ b/build.gradle
@@ -557,15 +557,17 @@ subprojects {
   afterEvaluate {
     if (!isReleaseVersion && System.env.USER == 'jenkins') {
       def settingsXml = new File(System.getProperty('user.home'), '.m2/settings.xml')
-      def snapshotCreds = new XmlSlurper().parse(settingsXml).servers.server.find { server
->
-        server.id.text() == 'apache.snapshots.https'
-      }
-
-      if (snapshotCreds != null) {
-        tasks.uploadArchives.doFirst {
-          repositories().withType(MavenDeployer).each { repo ->
-            repo.snapshotRepository.authentication.userName = snapshotCreds.username.text()
-            repo.snapshotRepository.authentication.password = snapshotCreds.password.text()
+      if (settingsXml.exists()) {
+        def snapshotCreds = new XmlSlurper().parse(settingsXml).servers.server.find { server
->
+          server.id.text() == 'apache.snapshots.https'
+        }
+  
+        if (snapshotCreds != null) {
+          tasks.uploadArchives.doFirst {
+            repositories().withType(MavenDeployer).each { repo ->
+              repo.snapshotRepository.authentication.userName = snapshotCreds.username.text()
+              repo.snapshotRepository.authentication.password = snapshotCreds.password.text()
+            }
           }
         }
       }


Mime
View raw message