diff --git a/build.gradle b/build.gradle index c63403d42d..cc280d8be6 100644 --- a/build.gradle +++ b/build.gradle @@ -238,14 +238,16 @@ allprojects { jcenter() maven { url 'https://jitpack.io' } maven { url "$artifactory_contextUrl/corda-releases" } // cordform-common - maven { - // For integrationTest task when running against Oracle database the JDBC driver is in Oracle Maven repository with login access only, - // setup an account on https://login.oracle.com/oaam_server/login.do - // provide credentials to Gradle task by -PmavenOracleUsername=... -PmavenOraclePassword=... - url "https://www.oracle.com/content/secure/maven/content" - credentials { - username = project.findProperty("mavenOracleUsername") ?: "" - password = project.findProperty("mavenOraclePassword") ?: "" + if (project.hasProperty("mavenOracleUsername") && project.hasProperty("mavenOraclePassword")) { + maven { + // For integrationTest task when running against Oracle database the JDBC driver is in Oracle Maven repository with login access only, + // setup an account on https://login.oracle.com/oaam_server/login.do + // provide credentials to Gradle task by -PmavenOracleUsername=... -PmavenOraclePassword=... + url "https://www.oracle.com/content/secure/maven/content" + credentials { + username = project.property("mavenOracleUsername") + password = project.property("mavenOraclePassword") + } } } }