Navigation Menu

Skip to content

Commit

Permalink
Update Log4J (1.12.2) (#7154)
Browse files Browse the repository at this point in the history
* Update Log4j

* update log4j (again)
  • Loading branch information
e-im committed Dec 20, 2021
1 parent 77cce82 commit e39995d
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 1 deletion.
132 changes: 132 additions & 0 deletions Spigot-Server-Patches/0385-Update-Log4j.patch
@@ -0,0 +1,132 @@
From 33ae2cae2ced3d6b3294a61d3c5b460667589c45 Mon Sep 17 00:00:00 2001
From: sulu5890 <sulu@sulu.me>
Date: Sat, 11 Dec 2021 10:35:42 -0600
Subject: [PATCH] Update Log4j


diff --git a/pom.xml b/pom.xml
index 132843880..d60021747 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,10 +90,11 @@
all its classes to check if they are plugins.
Scanning takes about 1-2 seconds so adding this speeds up the server start.
-->
+ <!-- Paper start - Update Log4j -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
- <version>2.8.1</version>
+ <version>2.17.0</version>
<scope>compile</scope>
</dependency>

@@ -101,22 +102,23 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
- <version>2.8.1</version>
+ <version>2.17.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-iostreams</artifactId>
- <version>2.8.1</version>
+ <version>2.17.0</version>
</dependency>

<!-- Paper - Async loggers -->
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
- <version>3.4.2</version>
+ <version>3.4.4</version>
<scope>runtime</scope>
</dependency>
+ <!-- Paper end - Update Log4j -->

<!-- testing -->
<dependency>
@@ -135,15 +137,17 @@

<repositories>
<repository>
- <id>spigotmc-public</id>
- <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
+ <!-- Paper start - update log4j -->
+ <id>paper</id>
+ <url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
- <id>spigotmc-public</id>
- <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
+ <id>paper</id>
+ <url>https://papermc.io/repo/repository/maven-public/</url>
+ <!-- paper end - update log4j -->
</pluginRepository>
</pluginRepositories>

@@ -184,6 +188,7 @@
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
<Specification-Vendor>Bukkit Team</Specification-Vendor>
+ <Multi-Release>true</Multi-Release> <!-- Paper start - update log4j -->
</manifestEntries>
<manifestSections>
<manifestSection>
@@ -211,7 +216,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>3.1.0</version>
+ <version>3.2.4</version> <!-- Paper - Update Log4j -->
<executions>
<execution>
<phase>package</phase>
@@ -220,6 +225,16 @@
</goals>
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation> <!-- Paper -->
+ <!-- Paper start - Update Log4j -->
+ <filters>
+ <filter>
+ <artifact>org.spigotmc:minecraft-server:**</artifact>
+ <excludes>
+ <exclude>org/apache/logging/log4j/**</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <!-- Paper end - Update Log4j -->
<relocations>
<!-- Paper - Workaround for hardcoded path lookup in dependency, easier than forking it - GH-189 -->
<!--<relocation>-->
@@ -251,16 +266,18 @@
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/java.sql.Driver</resource>
</transformer>
- <transformer implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer" />
+ <transformer implementation="io.github.edwgiz.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer" /> <!-- Paper - Update Log4j -->
</transformers>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
- <groupId>com.github.edwgiz</groupId>
- <artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId>
- <version>2.8.1</version>
+ <!-- paper start - update log4j -->
+ <groupId>io.github.edwgiz</groupId>
+ <artifactId>log4j-maven-shade-plugin-extensions</artifactId>
+ <version>2.17.0</version>
+ <!-- paper end - update log4j -->
</dependency>
</dependencies>
</plugin>
--
2.34.1

0 comments on commit e39995d

Please sign in to comment.