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()
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")
}
}
}
}