Only include the Oracle repository if the username/password properties are set. (#544)

This commit is contained in:
Chris Rankin 2018-03-12 16:03:13 +00:00 committed by GitHub
parent 065fdbf647
commit 5de831c1d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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