Apache Lucene open-source search software
LUCENE-10192: No need for hacky classpath, add the log4j module to the root set. Automatic modules have access to all other modules by default.
Dawid Weiss7f7007966e9f
diff --git a/lucene/distribution/binary-release.gradle b/lucene/distribution/binary-release.gradleindex ddfdb25595d..c06bb1a8777 100644--- a/lucene/distribution/binary-release.gradle+++ b/lucene/distribution/binary-release.gradle@@ -15,8 +15,6 @@* limitations under the License.*/-import org.apache.tools.ant.filters.ExpandProperties-// Configure Lucene's binary release. This is a bit convoluted so is placed// in a separate script.@@ -30,8 +28,6 @@ configure(project(":lucene:distribution")) {jarsjarsTestFrameworkjarsThirdParty-- log4j}dependencies { DependencyHandler handler ->@@ -65,9 +61,6 @@ configure(project(":lucene:distribution")) {transitive = true})}-- // Just to collect the version.- log4j "org.apache.logging.log4j:log4j-api"}@@ -86,18 +79,8 @@ configure(project(":lucene:distribution")) {}// Attach binary release - only files.-- // We need to substitute log4j jar name because it's a proper module (for luke)- // and is otherwise invisible.- dependsOn configurations.log4j- def antPrj = new org.apache.tools.ant.Project()- doFirst {- antPrj.setProperty("log4j.api.jar", configurations.log4j.singleFile.name)- }-from(file("src/binary-release"), {filteringCharset = 'UTF-8'- filter(ExpandProperties, project: antPrj)})// Cherry-pick certain files from the root.diff --git a/lucene/distribution/src/binary-release/bin/luke.cmd b/lucene/distribution/src/binary-release/bin/luke.cmdindex a718460ca3c..26f75776bc1 100644--- a/lucene/distribution/src/binary-release/bin/luke.cmd+++ b/lucene/distribution/src/binary-release/bin/luke.cmd@@ -17,5 +17,5 @@SETLOCALSET MODULES=%~dp0..-start javaw --module-path %MODULES%\modules;%MODULES%\modules-thirdparty -cp %MODULES%\modules-thirdparty\${log4j.api.jar} --module lucene.luke+start javaw --module-path %MODULES%\modules;%MODULES%\modules-thirdparty --add-modules org.apache.logging.log4j --module lucene.lukeENDLOCALdiff --git a/lucene/distribution/src/binary-release/bin/luke.sh b/lucene/distribution/src/binary-release/bin/luke.shindex d372b42a861..9d870885437 100644--- a/lucene/distribution/src/binary-release/bin/luke.sh+++ b/lucene/distribution/src/binary-release/bin/luke.sh@@ -16,4 +16,4 @@# limitations under the License.MODULES=$(cd $(dirname $0) && pwd)-java --module-path $MODULES/modules;$MODULES/modules-thirdparty -cp $MODULES/modules-thirdparty/${log4j.api.jar} --module lucene.luke+java --module-path $MODULES/modules;$MODULES/modules-thirdparty --add-modules org.apache.logging.log4j --module lucene.luke