diff --git a/.travis.yml b/.travis.yml index a2a9c388..dda1452a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,21 +58,11 @@ before_install: sleep 60; elif [ "$TEST_TASK" = "oracleXeTest" ]; then - if [ -n "$ORACLE_DRIVER_URL" ]; - then - mkdir -p drivers; - wget -q $ORACLE_DRIVER_URL --output-document ./drivers/oracledriver.jar; - ./src/scripts/thirdpartytest/start-thirdpartytest-db-containers.sh oracle; - sleep 90; - fi + ./src/scripts/thirdpartytest/start-thirdpartytest-db-containers.sh oracle; + sleep 90; fi script: -- if [ "$TEST_TASK" != "oracleXeTest" ] || [ -n "$ORACLE_DRIVER_URL" ]; - then - ./gradlew -Dsqoop.thirdparty.lib.dir=./drivers $TEST_TASK; - else - echo 'Skipping Oracle XE test execution because ORACLE_DRIVER_URL is not set.'; - fi +- ./gradlew $TEST_TASK; before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ diff --git a/COMPILING.txt b/COMPILING.txt index f5d7e795..2d7c8994 100644 --- a/COMPILING.txt +++ b/COMPILING.txt @@ -420,7 +420,7 @@ or thirdPartyTest ---- -Gradle is able download all of the necessary drivers except the Oracle one but the Ant build has to be provided +Gradle is able download all of the necessary drivers but the Ant build has to be provided with the drivers for all the databases. Please note that even if you do not need to install RDBMSs to run Sqoop third party tests against the Docker containers you still need to install the following tools: @@ -640,7 +640,3 @@ The steps for setting up the CI job are the following: The Travis CI job uses Gradle to build and test the project and it is able to execute all of the tests except the ones requiring an Oracle EE database. -Note that by default the Oracle XE tests are also disabled because the necessary +ojdbc6.jar+ is not publicly available. -Contributors have to upload +ojdbc6.jar+ to a public drive and make it available to the CI job by setting -the +ORACLE_DRIVER_URL+ environment variable in Travis (for more information see Travis -https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-settings[documentation]). diff --git a/build.gradle b/build.gradle index 47d4136c..02d069e0 100644 --- a/build.gradle +++ b/build.gradle @@ -46,6 +46,11 @@ repositories { maven { url 'https://artifacts.alfresco.com/nexus/content/repositories/public/' } + + // Oracle driver repository + maven { + url 'http://www.datanucleus.org/downloads/maven2/' + } } sourceSets { @@ -104,12 +109,10 @@ configurations.all { exclude group: 'org.apache.hadoop', module: 'avro' } -def sqoopThirdPartyLib = System.getProperty("sqoop.thirdparty.lib.dir") def forkEveryDefault = Integer.valueOf(System.getProperty("forkEvery.default", "0")) def ignoreTestFailures = Boolean.getBoolean("ignoreTestFailures") dependencies { - if (sqoopThirdPartyLib != null) runtime fileTree(dir: sqoopThirdPartyLib, include: '*.jar') compile group: 'org.apache.hadoop', name: 'hadoop-aws', version: hadoopVersion compile (group: 'org.apache.hadoop', name: 'hadoop-common', version: hadoopVersion) { exclude group: "asm", module: "asm" @@ -177,6 +180,8 @@ dependencies { testCompile group: 'cubrid', name: 'cubrid-jdbc', version: cubridJdbcDriverVersion testCompile group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: msSqlJdbcDriverVersion testCompile group: 'com.ibm.db2.jcc', name: 'db2jcc4', version: db2JdbcDriverVersion + testCompile group: 'oracle', name: 'ojdbc6', version: oracleJdbcDriverVersion + } task unitTest (type: Test) { diff --git a/gradle.properties b/gradle.properties index 924ce190..3b3eacef 100644 --- a/gradle.properties +++ b/gradle.properties @@ -55,6 +55,7 @@ mySqlConnectorVersion=5.1.47 cubridJdbcDriverVersion=10.1.2.7694 msSqlJdbcDriverVersion=7.0.0.jre8 db2JdbcDriverVersion=10.1 +oracleJdbcDriverVersion=11.2.0.3 checkstyleVersion=5.5