From 6b3bad9dca02bef018ccd732e6c978bb48ba064a Mon Sep 17 00:00:00 2001 From: Andrey Bespalov Date: Sun, 9 Jul 2017 19:00:57 +0300 Subject: [PATCH] Add Derby database implementation for Unit testing --- build.gradle | 20 ++++++++++++++----- .../2.13/taskArtifacts/cache.properties | 1 - build/libs/excel2db.properties | 17 ---------------- .../buildOutputCleanup/cache.properties | 2 -- build/resources/main/excel2db.properties | 17 ---------------- 5 files changed, 15 insertions(+), 42 deletions(-) delete mode 100644 build/libs/.gradle/2.13/taskArtifacts/cache.properties delete mode 100644 build/libs/excel2db.properties delete mode 100644 build/resources/main/.gradle/buildOutputCleanup/cache.properties delete mode 100644 build/resources/main/excel2db.properties diff --git a/build.gradle b/build.gradle index 119ed73..198adc0 100644 --- a/build.gradle +++ b/build.gradle @@ -39,22 +39,32 @@ repositories { dependencies { - //eliminate the :common project now since all method are in the excel2db class now - //compile project (":common") + compile 'ch.qos.logback:logback-classic:1.2.2' compile 'javax.persistence:persistence-api:1.0.2' compile ('org.springframework:spring-context:4.3.7.RELEASE'){ exclude module: 'commons-logging' // force Spring to use jcl-over-slf4j bridge } + compile 'org.springframework.boot:spring-boot-starter-test:1.5.3.RELEASE' compile 'org.apache.poi:poi:3.15' - compile 'org.apache.poi:poi-ooxml:3.15' - compile 'org.postgresql:postgresql:42.0.0.jre7' + compile 'org.apache.poi:poi-ooxml:3.15' compile 'org.apache.directory.studio:org.apache.commons.io:2.4' + + compile 'org.postgresql:postgresql:42.0.0.jre7' + + //jdbc drivers -- oracle, the Oracle driver is officially NOT shared in the Maven Repo + //because of license aspects + compile files('libs/ojdbc6.jar') + + //Derby is used as a mockup object for In-Memory testing + compile 'org.apache.derby:derby:10.13.1.1' + compile('junit:junit:4.12'){ exclude group: 'org.hamcrest' - } + } compile 'org.hamcrest:hamcrest-library:1.3' + } diff --git a/build/libs/.gradle/2.13/taskArtifacts/cache.properties b/build/libs/.gradle/2.13/taskArtifacts/cache.properties deleted file mode 100644 index d4ba7e9..0000000 --- a/build/libs/.gradle/2.13/taskArtifacts/cache.properties +++ /dev/null @@ -1 +0,0 @@ -#Mon May 29 17:23:29 MSK 2017 diff --git a/build/libs/excel2db.properties b/build/libs/excel2db.properties deleted file mode 100644 index 48cd326..0000000 --- a/build/libs/excel2db.properties +++ /dev/null @@ -1,17 +0,0 @@ -# names of input tables -input.files=test.xlsx - -# db implementation classes - -# postgres section -# dbConnectionImplenentation=excel2db.service.impl.DBConnectionPostgresImpl -# oracle section -dbConnectionImplenentation=excel2db.service.impl.DBConnectionOracleImpl - -# postgres connection parameters -db.server=localhost -db.database=excel2db -db.port=5433 -db.user=postgres -db.password=postgres - diff --git a/build/resources/main/.gradle/buildOutputCleanup/cache.properties b/build/resources/main/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index 617a29b..0000000 --- a/build/resources/main/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Tue Mar 28 13:08:49 MSK 2017 -gradle.version=3.4.1 diff --git a/build/resources/main/excel2db.properties b/build/resources/main/excel2db.properties deleted file mode 100644 index 48cd326..0000000 --- a/build/resources/main/excel2db.properties +++ /dev/null @@ -1,17 +0,0 @@ -# names of input tables -input.files=test.xlsx - -# db implementation classes - -# postgres section -# dbConnectionImplenentation=excel2db.service.impl.DBConnectionPostgresImpl -# oracle section -dbConnectionImplenentation=excel2db.service.impl.DBConnectionOracleImpl - -# postgres connection parameters -db.server=localhost -db.database=excel2db -db.port=5433 -db.user=postgres -db.password=postgres -