From 485221f9c3e0779609d1425cb04674d8b38d7ec1 Mon Sep 17 00:00:00 2001
From: Rick Herrick <jrherrick@wustl.edu>
Date: Wed, 10 Feb 2016 14:34:27 -0600
Subject: [PATCH] Removed attempted fix at handling empty properties. Renamed
 plugin to xnat. Added mavenLocal() to repositories for plugins.

---
 .gitignore   |  1 +
 build.gradle | 19 ++++++++-----------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/.gitignore b/.gitignore
index ac244197..1e58fa68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ build
 *.iml
 *.log
 src/generated
+gradle.properties
diff --git a/build.gradle b/build.gradle
index 68dacaa4..2a8fe3dc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,7 +22,7 @@ version vXnat
 
 buildscript {
     repositories {
-        jcenter()
+        mavenLocal()
         maven {
             url 'http://nrgxnat.artifactoryonline.com/nrgxnat/libs-release'
             name 'XNAT Release Repository'
@@ -31,6 +31,7 @@ buildscript {
             url 'http://nrgxnat.artifactoryonline.com/nrgxnat/libs-snapshot'
             name 'XNAT Snapshot Repository'
         }
+        jcenter()
     }
     dependencies {
         classpath "org.nrg.xnat.build:gradle-xnat-plugin:1.7.0-SNAPSHOT"
@@ -61,7 +62,7 @@ repositories {
     jcenter()
 }
 
-apply plugin: 'gradle-xnat-plugin'
+apply plugin: 'xnat'
 apply plugin: 'groovy'
 apply plugin: 'java'
 apply plugin: 'war'
@@ -278,16 +279,16 @@ dependencies {
 
 cargo {
     containerId = 'tomcat7x'
-    port = propertyWithDefault('deployPort', 8080) as int
+    port = deployPort as int
 
     deployable {
-        context = propertyWithDefault('deployContext', '/')
+        context = deployContext
     }
 
     remote {
-        hostname = propertyWithDefault('deployHost', 'localhost')
-        username = propertyWithDefault('deployUser', 'deploy')
-        password = propertyWithDefault('deployPassword', 'deploy')
+        hostname = deployHost
+        username = deployUser
+        password = deployPassword
     }
 }
 
@@ -350,7 +351,3 @@ publishing {
         }
     }
 }
-
-def propertyWithDefault(def String property, def defaultValue) {
-    hasProperty(property) ? eval(property) : defaultValue
-}
-- 
GitLab