Commit 6f3d64ab authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

410: Convert to Spring Boot library and application (OPENED)

Task-Url: #410
parent 9565156b
Pipeline #22568 passed with stage
in 27 seconds
......@@ -22,8 +22,17 @@ allprojects {
gtfVersion = "2.0.0-SNAPSHOT"
processingVersion = "4.1.0-SNAPSHOT"
colregModelVersion = "4.2-SNAPSHOT"
dariahSpVersion = "2.1.4-SNAPSHOT"
dariahSpVersion = "2.1.4-SNAPSHOT"
jsonAssertVersion = "1.5.0"
jodaTimeVersion = "2.10.10"
commonsTextVersion = "1.9"
commonsCompressVersion = "1.20"
commonsIoVersion = "2.8.0"
commonsCodecVersion = "1.15"
tikaVersion = "1.25"
mockitoVersion = "3.8.0"
mavenRepo = 'https://minfba.de.dariah.eu/nexus/repository/minfba-central/'
releasesRepo = "https://minfba.de.dariah.eu/nexus/repository/minfba-releases/"
snapshotsRepo = "https://minfba.de.dariah.eu/nexus/repository/minfba-snapshots/"
......@@ -47,6 +56,15 @@ subprojects {
apply plugin: 'maven-publish'
apply plugin: 'io.spring.dependency-management'
// https://stackoverflow.com/a/53824670
configurations {
implementation {
exclude group: 'xml-apis', module: 'xml-apis'
exclude group: 'xml-apis', module: 'xml-apis-ext'
exclude group: 'xerces', module: 'xercesImpl'
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
}
......
......@@ -4,124 +4,71 @@ plugins {
description = "DARIAH-DE Generic Search - Core library"
// https://stackoverflow.com/a/53824670
configurations {
implementation {
exclude group: 'xml-apis', module: 'xml-apis'
exclude group: 'xml-apis', module: 'xml-apis-ext'
exclude group: 'xerces', module: 'xercesImpl'
}
}
/*configurations.all {
transitive = false
}*/
ext {
jsonAssertVersion = "1.5.0"
jodaTimeVersion = "2.10.10"
commonsTextVersion = "1.9"
commonsCompressVersion = "1.20"
commonsIoVersion = "2.8.0"
commonsCodecVersion = "1.15"
tikaVersion = "1.25"
mockitoVersion = "3.8.0"
}
dependencies {
implementation "de.unibamberg.minf.core:core-metamodel:$coreVersion"
implementation "de.unibamberg.minf.core:core-web:$coreVersion"
implementation "de.unibamberg.minf.core:core-util:$coreVersion"
implementation "eu.dariah.de:colreg-model:$colregModelVersion"
implementation "org.springframework:spring-core"
implementation "org.springframework:spring-context"
implementation "org.springframework:spring-beans"
implementation "org.springframework:spring-web"
implementation "org.springframework:spring-webmvc"
// MINF
api "de.unibamberg.minf.core:core-metamodel:$coreVersion"
api "de.unibamberg.minf.core:core-web:$coreVersion"
api "de.unibamberg.minf.core:core-util:$coreVersion"
api "eu.dariah.de:colreg-model:$colregModelVersion"
api "de.unibamberg.minf.processing:processing-core:$processingVersion"
api "de.unibamberg.minf.processing:processing-adapters:$processingVersion"
api "de.unibamberg.minf.gtf:gtf-base:$gtfVersion"
api "de.unibamberg.minf.gtf:gtf-core:$gtfVersion"
api "de.unibamberg.minf.gtf:gtf-extension-file:$gtfVersion"
api "de.unibamberg.minf.gtf:gtf-extension-wiki:$gtfVersion"
api "de.unibamberg.minf.gtf:gtf-extension-geo:$gtfVersion"
api "de.unibamberg.minf.gtf:gtf-extension-nlp:$gtfVersion"
api "de.unibamberg.minf.gtf:gtf-extension-vocabulary:$gtfVersion"
api "de.unibamberg.minf.gtf:gtf-extension-dai:$gtfVersion"
api "eu.dariah.de:dariahsp-core:$dariahSpVersion"
// Spring & data
api "org.springframework:spring-core"
api "org.springframework:spring-context"
api "org.springframework:spring-beans"
api "org.springframework:spring-web"
api "org.springframework:spring-webmvc"
api "org.springframework.data:spring-data-commons"
api "org.springframework.data:spring-data-mongodb"
api "org.springframework.data:spring-data-elasticsearch"
api "org.mongodb:mongodb-driver-sync"
api "org.mongodb:bson"
api "org.hibernate.validator:hibernate-validator"
api "javax.validation:validation-api"
api "org.apache.httpcomponents:httpclient"
implementation "org.springframework.data:spring-data-commons"
implementation "org.springframework.data:spring-data-mongodb"
implementation "org.springframework.data:spring-data-elasticsearch"
implementation "org.mongodb:mongodb-driver-sync"
implementation "org.mongodb:bson"
// Jackson
api "com.fasterxml.jackson.core:jackson-core"
api "com.fasterxml.jackson.core:jackson-databind"
api "com.fasterxml.jackson.core:jackson-annotations"
implementation "org.apache.commons:commons-compress:$commonsCompressVersion"
implementation "org.apache.commons:commons-text:$commonsTextVersion"
implementation "commons-io:commons-io:$commonsIoVersion"
implementation "commons-codec:commons-codec:$commonsCodecVersion"
// Apache Commons
api "org.apache.commons:commons-compress:$commonsCompressVersion"
api "org.apache.commons:commons-text:$commonsTextVersion"
api "commons-io:commons-io:$commonsIoVersion"
api "commons-codec:commons-codec:$commonsCodecVersion"
implementation "org.skyscreamer:jsonassert:$jsonAssertVersion"
implementation "org.hibernate.validator:hibernate-validator"
implementation "javax.validation:validation-api"
implementation "de.unibamberg.minf.gtf:gtf-base:$gtfVersion"
implementation "de.unibamberg.minf.gtf:gtf-core:$gtfVersion"
implementation "de.unibamberg.minf.gtf:gtf-extension-file:$gtfVersion"
implementation "de.unibamberg.minf.gtf:gtf-extension-wiki:$gtfVersion"
implementation "de.unibamberg.minf.gtf:gtf-extension-geo:$gtfVersion"
implementation "de.unibamberg.minf.gtf:gtf-extension-nlp:$gtfVersion"
implementation "de.unibamberg.minf.gtf:gtf-extension-vocabulary:$gtfVersion"
implementation "de.unibamberg.minf.gtf:gtf-extension-dai:$gtfVersion"
implementation "de.unibamberg.minf.processing:processing-core:$processingVersion"
implementation "de.unibamberg.minf.processing:processing-adapters:$processingVersion"
implementation "eu.dariah.de:dariahsp-core:$dariahSpVersion"
implementation "org.apache.httpcomponents:httpclient"
//implementation "org.elasticsearch:elasticsearch"
implementation "org.slf4j:slf4j-api"
implementation "joda-time:joda-time:$jodaTimeVersion"
//implementation "joda-time:joda-time-jsptags:1.1.1"
//implementation "commons-io:commons-io"
//implementation "org.apache.commons:commons-compress"
//implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml"
//implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda"
//implementation "org.skyscreamer:jsonassert:1.4.0"
implementation "org.apache.tika:tika-core:$tikaVersion"
implementation "org.apache.tika:tika-parsers:$tikaVersion"
implementation "org.elasticsearch:elasticsearch"
//testImplementation "org.springframework.boot:spring-boot-starter-test"
// Other
api "org.skyscreamer:jsonassert:$jsonAssertVersion"
api "org.slf4j:slf4j-api"
api "joda-time:joda-time:$jodaTimeVersion"
api "org.apache.tika:tika-core:$tikaVersion"
api "org.apache.tika:tika-parsers:$tikaVersion"
api "org.elasticsearch:elasticsearch"
compileOnly "javax.servlet:javax.servlet-api"
// Testing
testImplementation "org.springframework:spring-test"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion"
//testImplementation "junit:junit:4.12"
//
//testImplementation "org.junit.jupiter:junit-jupiter-engine"
///testImplementation "org.junit.jupiter:junit-jupiter-api"
//testImplementation "org.junit.jupiter:junit-jupiter-params"
//testImplementation "org.slf4j:jcl-over-slf4j"
//testImplementation "org.slf4j:log4j-over-slf4j"
//testImplementation "ch.qos.logback:logback-core"
//testImplementation "ch.qos.logback:logback-classic"
compileOnly "javax.servlet:javax.servlet-api"
// Lombok
compileOnly "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"
testCompileOnly "org.projectlombok:lombok"
......
package eu.dariah.de.search.dao;
package eu.dariah.de.search.dao.db;
import eu.dariah.de.search.dao.base.MongoDao;
......
package eu.dariah.de.search.dao;
package eu.dariah.de.search.dao.db;
import org.springframework.stereotype.Component;
......
package eu.dariah.de.search.dao;
package eu.dariah.de.search.dao.db;
import eu.dariah.de.dariahsp.model.User;
import eu.dariah.de.search.dao.base.MongoDao;
......
package eu.dariah.de.search.dao;
package eu.dariah.de.search.dao.db;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
......
package eu.dariah.de.search.dao;
package eu.dariah.de.search.dao.db;
import de.unibamberg.minf.dme.model.version.VersionInfo;
import eu.dariah.de.search.dao.base.MongoDao;
......
package eu.dariah.de.search.dao;
package eu.dariah.de.search.dao.db;
import org.springframework.stereotype.Repository;
......
......@@ -12,8 +12,8 @@ import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import eu.dariah.de.search.dao.CollectionDao;
import eu.dariah.de.search.dao.CustomSearchDao;
import eu.dariah.de.search.dao.db.CollectionDao;
import eu.dariah.de.search.dao.db.CustomSearchDao;
import eu.dariah.de.search.model.Collection;
import eu.dariah.de.search.model.Dataset;
import eu.dariah.de.search.model.Endpoint;
......
......@@ -15,8 +15,8 @@ import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;
import eu.dariah.de.search.dao.CrawlDao;
import eu.dariah.de.search.dao.CollectionDao;
import eu.dariah.de.search.dao.db.CollectionDao;
import eu.dariah.de.search.dao.db.CrawlDao;
import eu.dariah.de.search.dao.fs.CrawlDataDao;
import eu.dariah.de.search.model.Crawl;
import eu.dariah.de.search.model.Dataset;
......
......@@ -9,8 +9,8 @@ import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;
import eu.dariah.de.search.dao.CollectionDao;
import eu.dariah.de.search.dao.CustomSearchDao;
import eu.dariah.de.search.dao.db.CollectionDao;
import eu.dariah.de.search.dao.db.CustomSearchDao;
import eu.dariah.de.search.model.CustomSearch;
import eu.dariah.de.search.model.CustomSearch.UserRole;
import eu.dariah.de.search.pojo.CustomSearchPojo;
......
......@@ -3,7 +3,7 @@ package eu.dariah.de.search.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import eu.dariah.de.search.dao.CollectionDao;
import eu.dariah.de.search.dao.db.CollectionDao;
import eu.dariah.de.search.model.Collection;
import eu.dariah.de.search.model.Dataset;
import eu.dariah.de.search.model.Endpoint;
......
......@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import de.unibamberg.minf.core.web.exception.PermissionDeniedException;
import eu.dariah.de.search.dao.ElementCollectionDao;
import eu.dariah.de.search.dao.db.ElementCollectionDao;
import eu.dariah.de.search.model.ElementCollection;
import eu.dariah.de.search.model.ElementCollectionItem;
......
......@@ -3,7 +3,7 @@ package eu.dariah.de.search.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import eu.dariah.de.search.dao.CollectionDao;
import eu.dariah.de.search.dao.db.CollectionDao;
import eu.dariah.de.search.model.Collection;
import eu.dariah.de.search.model.Endpoint;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment