Fully remove log4j use

This commit is contained in:
Arnaud Roques 2021-12-12 15:01:14 +01:00
parent 7b0022de44
commit 54016d325d
3 changed files with 9 additions and 40 deletions

View File

@ -57,7 +57,6 @@
<!-- Please keep the jetty version identical with the docker image -->
<jetty.version>11.0.7</jetty.version>
<codemirror.version>5.63.0</codemirror.version>
<slf4j.version>1.7.32</slf4j.version>
<!-- dependencies -->
<jstl.version>1.2</jstl.version>
@ -69,9 +68,7 @@
<jlatexmath.version>1.0.7</jlatexmath.version>
<jlatexmath-font-greek.version>${jlatexmath.version}</jlatexmath-font-greek.version>
<jlatexmath-font-cyrillic.version>${jlatexmath.version}</jlatexmath-font-cyrillic.version>
<!-- Logging -->
<slf4j-log4j12.version>${slf4j.version}</slf4j-log4j12.version>
<slf4j-api.version>${slf4j.version}</slf4j-api.version>
<!-- Testing -->
<junit.version>4.13.2</junit.version>
<htmlunit.version>2.53.0</htmlunit.version>
@ -169,17 +166,7 @@
<artifactId>jlatexmath-font-cyrillic</artifactId>
<version>${jlatexmath-font-cyrillic.version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-log4j12.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>

19
pom.xml
View File

@ -57,7 +57,6 @@
<!-- Please keep the jetty version identical with the docker image -->
<jetty.version>11.0.7</jetty.version>
<codemirror.version>5.63.0</codemirror.version>
<slf4j.version>1.7.32</slf4j.version>
<!-- dependencies -->
<jstl.version>1.2</jstl.version>
@ -69,9 +68,7 @@
<jlatexmath.version>1.0.7</jlatexmath.version>
<jlatexmath-font-greek.version>${jlatexmath.version}</jlatexmath-font-greek.version>
<jlatexmath-font-cyrillic.version>${jlatexmath.version}</jlatexmath-font-cyrillic.version>
<!-- Logging -->
<slf4j-log4j12.version>${slf4j.version}</slf4j-log4j12.version>
<slf4j-api.version>${slf4j.version}</slf4j-api.version>
<!-- Testing -->
<junit.version>4.13.2</junit.version>
<htmlunit.version>2.53.0</htmlunit.version>
@ -147,18 +144,8 @@
<artifactId>jlatexmath-font-cyrillic</artifactId>
<version>${jlatexmath-font-cyrillic.version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-log4j12.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<!-- Testing -->
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -8,9 +8,6 @@ import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import junit.framework.TestCase;
import net.sourceforge.plantuml.servlet.server.EmbeddedJettyServer;
import net.sourceforge.plantuml.servlet.server.ExternalServer;
@ -19,8 +16,6 @@ import net.sourceforge.plantuml.servlet.server.ServerUtils;
public abstract class WebappTestCase extends TestCase {
protected final Logger logger;
private final ServerUtils serverUtils;
public WebappTestCase() {
@ -29,26 +24,26 @@ public abstract class WebappTestCase extends TestCase {
public WebappTestCase(String name) {
super(name);
logger = LoggerFactory.getLogger(this.getClass());
// logger = LoggerFactory.getLogger(this.getClass());
String uri = System.getProperty("system.test.server", "");
//uri = "http://localhost:8080/plantuml";
if (!uri.isEmpty()) {
// mvn test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
logger.info("Test against external server: " + uri);
// logger.info("Test against external server: " + uri);
serverUtils = new ExternalServer(uri);
return;
}
// mvn test -DskipTests=false
logger.info("Test against embedded jetty server.");
// logger.info("Test against embedded jetty server.");
serverUtils = new EmbeddedJettyServer();
}
@Override
public void setUp() throws Exception {
serverUtils.startServer();
logger.info(getServerUrl());
// logger.info(getServerUrl());
}
@Override