diff --git a/build.gradle b/build.gradle index 43114071ab03bf704fcebdf87577cb7415b292ec..f2ab0dd02b6fb013951c12e309a2c460e6a32a65 100644 --- a/build.gradle +++ b/build.gradle @@ -290,17 +290,19 @@ dependencies { } cargo { + def blankProperty = "xxx" + def blankPort = 0 containerId = 'tomcat7x' - port = deployPort as int + port = hasProperty('deployPort') ? getProperty('deployPort') as int : blankPort deployable { - context = deployContext + context = hasProperty('deployContext') ? getProperty('deployContext') : blankProperty } remote { - hostname = deployHost - username = deployUser - password = deployPassword + hostname = hasProperty('deployHost') ? getProperty('deployHost') : blankProperty + username = hasProperty('deployUser') ? getProperty('deployUser') : blankProperty + password = hasProperty('deployPassword') ? getProperty('deployPassword') : blankProperty } } @@ -335,12 +337,13 @@ publishing { } } repositories { + def blankProperty = "xxx" maven { credentials { // These properties must be set in the ~/.gradle/gradle.properties file or passed on the Gradle command // line in the form -DrepoUsername=foo -DrepoPassword=bar. - username repoUsername - password repoPassword + username hasProperty('repoUsername') ? getProperty('repoUsername') : blankProperty + password hasProperty('repoPassword') ? getProperty('repoPassword') : blankProperty } if (project.version.endsWith('-SNAPSHOT')) { url "http://nrgxnat.artifactoryonline.com/nrgxnat/libs-snapshot-local" @@ -352,8 +355,8 @@ publishing { credentials { // These properties must be set in the ~/.gradle/gradle.properties file or passed on the Gradle command // line in the form -DrepoUsername=foo -DrepoPassword=bar. - username repoUsername - password repoPassword + username hasProperty('repoUsername') ? getProperty('repoUsername') : blankProperty + password hasProperty('repoPassword') ? getProperty('repoPassword') : blankProperty } if (project.version.endsWith('-SNAPSHOT')) { url "http://nrgxnat.artifactoryonline.com/nrgxnat/libs-snapshot-local"