From f4c1a1dcac0b2cd208889878f46b336ecdd21800 Mon Sep 17 00:00:00 2001 From: Vit Zikmund Date: Sat, 2 Dec 2023 01:16:49 +0100 Subject: [PATCH] fix: simplify project dependencies, fix tests Many of the explicitly referenced dependencies are actually a transitive dependency of some of the others. Especially with test dependencies, where some transitive dependencies were excluded in favor of yet another explicit ones. This was quite hard to untangle and if there ever was a trouble with those versions, it's likely not the case with 8.7.1 and above. I was also quite confused with the 'plugin.version' property, which seemed to mimic the implicit 'project.version'. These were also likely intermixed in plugin-descriptor.properties, so this change tries to fix that by replacing 'plugin.version' with 'project.version' where appropriate, ultimately removing the 'plugin.version'. Same was done with 'lucene.version' which was there only to draw in an explicit version of 'org.apache.lucene:lucene-test-framework', despite the correct version already being a dependency of 'org.elasticsearch.test:framework'. Despite all the simplifications above the tests still had problems executing. This was ultimately resolved by using a newer version of the maven-surefire-plugin. --- plugin-descriptor.properties | 4 +-- pom.xml | 64 ++---------------------------------- 2 files changed, 5 insertions(+), 63 deletions(-) diff --git a/plugin-descriptor.properties b/plugin-descriptor.properties index 8fdbee1..c814b3c 100644 --- a/plugin-descriptor.properties +++ b/plugin-descriptor.properties @@ -1,6 +1,6 @@ description=Lemmatizer token filter -version=${elasticsearch.version} +version=${project.version} name=elasticsearch-analysis-lemmagen classname=org.elasticsearch.plugin.analysis.lemmagen.AnalysisLemmagenPlugin java.version=1.8 -elasticsearch.version=${plugin.version} +elasticsearch.version=${elasticsearch.version} diff --git a/pom.xml b/pom.xml index 02bd3b9..7f311b3 100644 --- a/pom.xml +++ b/pom.xml @@ -10,8 +10,6 @@ 8.6.1 jar - 8.6.1 - 9.4.2 8.6.1 UTF-8 @@ -27,73 +25,17 @@ jlemmagen 1.0 - - org.slf4j - slf4j-api - 1.6.2 - org.slf4j slf4j-simple - 1.6.2 - - - org.apache.lucene - lucene-test-framework - ${lucene.version} - test - - - org.hamcrest - hamcrest-core - 2.1 - test - - - org.hamcrest - hamcrest-library - 2.1 - test + + 1.7.30 org.elasticsearch.test framework ${elasticsearch.version} test - - - org.hamcrest - hamcrest-all - - - junit - junit - - - - - junit - junit - 4.13.1 - test - - - org.hamcrest - hamcrest-core - - - - - org.apache.logging.log4j - log4j-core - [2.16.0,) - test - - - org.apache.logging.log4j - log4j-api - [2.16.0,) - test @@ -133,7 +75,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.14 + 3.2.2 -Dtests.security.manager=false