mirror of https://github.com/apache/lucene.git
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.
This commit is contained in:
parent
627ef4d469
commit
7f7007966e
|
@ -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")) {
|
|||
jars
|
||||
jarsTestFramework
|
||||
jarsThirdParty
|
||||
|
||||
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.
|
||||
|
|
|
@ -17,5 +17,5 @@
|
|||
|
||||
SETLOCAL
|
||||
SET 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.luke
|
||||
ENDLOCAL
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue