我与Gretty有项目,现在我准备将其部署到外部服务器。原来那里的旧码头版本(低于9.4),不适用于JEP-238。但是log4j的最新版本是JEP-238。我收到如下错误:
Error scanning entry "module-info.class" when starting Jetty server
我有2个变体:
但是log4j没有定义为明显的依赖关系,它添加到其他依赖关系中,我不知道哪个。 build.gradle:
plugins {
id 'java'
id 'war'
id "org.gretty" version "2.2.0"
}
group 'ru.example'
version '0.1'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
ext {
SPRING_VERSION = '5.1.0.RELEASE'
JUNIT_VERSION = '5.3.1'
JACKSON_VERSION = '2.9.7'
LOMBOK_VERSION = '1.18.2'
}
repositories {
mavenCentral()
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/releases/'
}
}
gretty {
springBootVersion = '2.0.5.RELEASE'
contextPath = "/"
}
dependencies {
// annotationProcessor group: 'org.projectlombok', name: 'lombok', version: LOMBOK_VERSION
compileOnly group: 'org.projectlombok', name: 'lombok', version: LOMBOK_VERSION
compileOnly group: 'com.google.appengine', name: 'appengine-endpoints-deps', version: '1.9.65'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'org.springframework', name: 'spring-webmvc', version: SPRING_VERSION
compile group: 'org.springframework', name: 'spring-web', version: SPRING_VERSION
compile group: 'org.springframework', name: 'spring-jdbc', version: SPRING_VERSION
compile ("org.springframework.security:spring-security-web:4.1.0.RELEASE") {
exclude(module:'spring-web')
}
compile ("org.springframework.security:spring-security-config:4.1.0.RELEASE")
compile ("org.springframework.security:spring-security-ldap:4.1.0.RELEASE")
compile 'org.thymeleaf:thymeleaf-spring4:3.0.9.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.0.5.RELEASE'
compile group: 'com.mchange', name: 'c3p0', version: '0.9.5.2'
compile group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.3.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: JACKSON_VERSION
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: JACKSON_VERSION
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: JACKSON_VERSION
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6'
compile group: 'org.apache.poi', name: 'poi-ooxml', version: '4.0.0'
compile group: 'com.google.guava', name: 'guava', version: '26.0-jre'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
compile group: 'org.hibernate', name: 'hibernate-validator', version: '6.0.13.Final'
// testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: JUNIT_VERSION
// testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: JUNIT_VERSION
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: JUNIT_VERSION
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.22.0'
testCompile group: 'org.springframework', name: 'spring-test', version: SPRING_VERSION
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testCompile group: 'com.jayway.jsonpath', name: 'json-path-assert', version: '2.4.0'
testCompile group: 'com.h2database', name: 'h2', version: '1.4.197'
}
外部库中有log4j 2.10.0版本,但我需要2.8。 我无法定义,我需要从哪个依赖项中删除log4j,以添加依赖项清单。请帮助。