diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57d3e21a..88ac7ec6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,11 +10,11 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v5 - - name: Set up JDK 1.8 + - name: Set up JDK 11 uses: actions/setup-java@v5 with: distribution: temurin - java-version: 8 + java-version: 11 - name: Install and start Elasticsearch env: ES_DOWNLOAD_URL: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${{ env.ES_VERSION }}.tar.gz diff --git a/README.md b/README.md index 219f2179..8e5286fd 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ lobid-gnd: access GND+EntityFacts data as JSON-LD over HTTP. ### Prerequisites +Java 11 + `sbt 0.13` or newer --- [download sbt](http://www.scala-sbt.org/download/) Elasticsearch 5.6.x (configured in `application.conf`) diff --git a/build.sbt b/build.sbt index 2b17f479..f70bd190 100644 --- a/build.sbt +++ b/build.sbt @@ -8,7 +8,7 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava) EclipseKeys.projectFlavor := EclipseProjectFlavor.Java EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources) -scalaVersion := "2.12.4" +scalaVersion := "2.12.12" libraryDependencies += guice @@ -20,15 +20,15 @@ libraryDependencies += "javax.mail" % "mail" % "1.4.1" libraryDependencies += "org.apache.jena" % "apache-jena-libs" % "3.7.0" -libraryDependencies += "org.metafacture" % "metafacture-framework" % "5.4.0" +libraryDependencies += "org.metafacture" % "metafacture-framework" % "7.0.0" -libraryDependencies += "org.metafacture" % "metafacture-flowcontrol" % "5.4.0" +libraryDependencies += "org.metafacture" % "metafacture-flowcontrol" % "7.0.0" -libraryDependencies += "org.metafacture" % "metafacture-io" % "5.4.0" +libraryDependencies += "org.metafacture" % "metafacture-io" % "7.0.0" -libraryDependencies += "org.metafacture" % "metafacture-xml" % "5.4.0" +libraryDependencies += "org.metafacture" % "metafacture-xml" % "7.0.0" -libraryDependencies += "org.metafacture" % "metafacture-elasticsearch" % "5.4.0" exclude("com.fasterxml.jackson.core", "jackson-databind") +libraryDependencies += "org.metafacture" % "metafacture-elasticsearch" % "7.0.0" exclude("com.fasterxml.jackson.core", "jackson-databind") libraryDependencies += "org.elasticsearch" % "elasticsearch" % "5.6.3" @@ -46,6 +46,8 @@ libraryDependencies += "org.apache.logging.log4j" % "log4j-api" % "2.16.0" libraryDependencies += "org.hamcrest" % "hamcrest-library" % "1.3" % Test +javacOptions ++= Seq("-source", "11", "-target", "11") + resolvers += Resolver.mavenLocal trapExit := false diff --git a/conf/application.conf b/conf/application.conf index 84c355aa..f83bc2b4 100644 --- a/conf/application.conf +++ b/conf/application.conf @@ -35,7 +35,7 @@ entityfacts { index { boot: { - hosts: ["localhost"] # ["weywot3.hbz-nrw.de", "weywot4.hbz-nrw.de", "weywot5.hbz-nrw.de"] + hosts: ["localhost"] cluster: "elasticsearch" # "weywot" name: "gnd-boot" # "gnd" } diff --git a/monit_restart.sh b/monit_restart.sh index fac6734e..e3093895 100755 --- a/monit_restart.sh +++ b/monit_restart.sh @@ -25,7 +25,7 @@ HOME="/home/sol" # it is important to set the proper locale . $HOME/.locale -export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ +export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ JAVA_OPTS=$(echo "$JAVA_OPTS" |sed 's#,#\ #g') cd $HOME/git/$REPO @@ -34,7 +34,9 @@ case $ACTION in if [ -f target/universal/stage/RUNNING_PID ]; then kill $(cat target/universal/stage/RUNNING_PID) fi - JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" sbt --java-home $JAVA_HOME "start $PORT" + sbt clean + sbt --java-home $JAVA_HOME stage + JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" ./target/universal/stage/bin/lobid-gnd -Dhttp.port=$PORT -no-version-check ;; stop) if [ -f target/universal/stage/RUNNING_PID ]; then diff --git a/project/build.properties b/project/build.properties index c091b86c..8e682c52 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=0.13.18 diff --git a/test/data/GND.jsonl b/test/data/GND.jsonl index 48f5b359..1be4713b 100644 --- a/test/data/GND.jsonl +++ b/test/data/GND.jsonl @@ -5,6 +5,6 @@ {"index":{"_index":"gnd-test","_type":"authority","_id":"https://d-nb.info/gnd/1077774206"}} {"geographicAreaCode":[{"id":"https://d-nb.info/standards/vocab/gnd/geographic-area-code#XD-US","label":"USA"}],"biographicalOrHistoricalInformation":["Faculty of Infectious and Tropical Diseases, London School of Hygiene and Tropicπ˜›Œτ€π˜š£π˜šΎπ˜›π˜›τ€Œπ˜›Žτ€Œπ˜›“π˜›","Rollins School of Public Health, Emory University, Atlanta, Ga."],"gender":[{"id":"https://d-nb.info/standards/vocab/gnd/gender#male","label":"MΓ€nnlich"}],"gndIdentifier":"1077774206","id":"https://d-nb.info/gnd/1077774206","preferredName":"Clasen, Thomas","type":["DifferentiatedPerson","Person","AuthorityResource"],"@context":"https://lobid.org/gnd/context.jsonld","preferredNameEntityForThePerson":{"forename":["Thomas"],"surname":["Clasen"]},"sameAs":[{"id":"http://viaf.org/viaf/182144782963056229916","collection":{"id":"http://www.wikidata.org/entity/Q54919","abbr":"VIAF","publisher":"OCLC","icon":"http://viaf.org/viaf/images/viaf.ico","name":"Virtual International Authority File (VIAF)"}}]} {"index":{"_index":"gnd-test","_type":"authority","_id":"https://d-nb.info/gnd/1072719991"}} -{"gender":[{"id":"https://d-nb.info/standards/vocab/gnd/gender#notKnown","label":"Unbekannt"}],"variantNameEntityForThePerson":[{"forename":["良𩆩"],"surname":["θΆ™"]},{"personalName":["Zhao Liang shu"]},{"personalName":["Zhao Liangshu"]}],"type":["AuthorityResource","DifferentiatedPerson","Person"],"@context":"https://lobid.org/gnd/context.jsonld","geographicAreaCode":[{"id":"https://d-nb.info/standards/vocab/gnd/geographic-area-code#XB-CN","label":"China"}],"biographicalOrHistoricalInformation":["Chines. Gelehrter der Qing-Dynastie, Jinshi-Grad 1795"],"periodOfActivity":["1795-"],"gndIdentifier":"1072719991","id":"https://d-nb.info/gnd/1072719991","preferredName":"Zhao, Liangshu","variantName":["Zhao Liang shu","θΆ™, 良𩆩","Zhao Liangshu"],"preferredNameEntityForThePerson":{"forename":["Liangshu"],"surname":["Zhao"]},"sameAs":[{"id":"http://viaf.org/viaf/316502188","collection":{"id":"http://www.wikidata.org/entity/Q54919","abbr":"VIAF","publisher":"OCLC","icon":"http://viaf.org/viaf/images/viaf.ico","name":"Virtual International Authority File (VIAF)"}}]} +{"gender":[{"id":"https://d-nb.info/standards/vocab/gnd/gender#notKnown","label":"Unbekannt"}],"variantNameEntityForThePerson":[{"personalName":["Zhao Liang shu"]},{"forename":["良𩆩"],"surname":["θΆ™"]},{"personalName":["Zhao Liangshu"]}],"type":["AuthorityResource","DifferentiatedPerson","Person"],"@context":"https://lobid.org/gnd/context.jsonld","geographicAreaCode":[{"id":"https://d-nb.info/standards/vocab/gnd/geographic-area-code#XB-CN","label":"China"}],"biographicalOrHistoricalInformation":["Chines. Gelehrter der Qing-Dynastie, Jinshi-Grad 1795"],"periodOfActivity":["1795-"],"gndIdentifier":"1072719991","id":"https://d-nb.info/gnd/1072719991","preferredName":"Zhao, Liangshu","variantName":["Zhao Liang shu","θΆ™, 良𩆩","Zhao Liangshu"],"preferredNameEntityForThePerson":{"forename":["Liangshu"],"surname":["Zhao"]},"sameAs":[{"id":"http://viaf.org/viaf/316502188","collection":{"id":"http://www.wikidata.org/entity/Q54919","abbr":"VIAF","publisher":"OCLC","icon":"http://viaf.org/viaf/images/viaf.ico","name":"Virtual International Authority File (VIAF)"}}]} {"index":{"_index":"gnd-test","_type":"authority","_id":null}} {"@context":"https://lobid.org/gnd/context.jsonld"}