Skip to content
Snippets Groups Projects
Commit 2b998ce6 authored by Rick Herrick's avatar Rick Herrick
Browse files

Added propertyWithDefault() method to allow for not setting deploy

properties explicitly.
parent 0c5f7d34
No related branches found
No related tags found
No related merge requests found
...@@ -278,16 +278,16 @@ dependencies { ...@@ -278,16 +278,16 @@ dependencies {
cargo { cargo {
containerId = 'tomcat7x' containerId = 'tomcat7x'
port = deployPort as int port = propertyWithDefault('deployPort', 8080) as int
deployable { deployable {
context = deployContext context = propertyWithDefault('deployContext', '/')
} }
remote { remote {
hostname = deployHost hostname = propertyWithDefault('deployHost', 'localhost')
username = deployUser username = propertyWithDefault('deployUser', 'deploy')
password = deployPassword password = propertyWithDefault('deployPassword', 'deploy')
} }
} }
...@@ -350,3 +350,7 @@ publishing { ...@@ -350,3 +350,7 @@ publishing {
} }
} }
} }
def propertyWithDefault(def String property, def defaultValue) {
hasProperty(property) ? eval(property) : defaultValue
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment