Skip to content

Commit

Permalink
Merge pull request #1315 from b2ihealthcare/issue/SO-6223-replace-log…
Browse files Browse the repository at this point in the history
…4j-with-reload4j

SO-6223: Remove log4j 1.x jars completely
  • Loading branch information
cmark authored Aug 15, 2024
2 parents 7f7656b + d935bca commit 5ae692b
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -981,13 +981,6 @@ Visit us at https://b2ihealthcare.com
version="0.0.0"
unpack="false"/>

<plugin
id="org.apache.log4j"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.glassfish.expressly"
download-size="0"
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@
<id>org.slf4j.jcl</id>
<removeAll />
</filter>
<!--Remove log4j 1.x jars-->
<filter>
<type>p2-installable-unit</type>
<id>org.apache.log4j</id>
<removeAll />
</filter>
</filters>
<environments>
<environment>
Expand Down
7 changes: 7 additions & 0 deletions releng/log4j-over-slf4j-manifest-export-fix/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>log4j-over-slf4j-manifest-export-fix</name>
<comment></comment>
<projects>
</projects>
</projectDescription>
102 changes: 102 additions & 0 deletions releng/log4j-over-slf4j-manifest-export-fix/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.b2international</groupId>
<artifactId>log4j-over-slf4j-reficio</artifactId>
<version>0.0.1-SNAPSHOT</version>

<properties>
<slf4j.version>2.0.11</slf4j.version>

<!-- Artifact distribution -->
<maven.repository.id>nexus_deployment</maven.repository.id>
<maven.releases.repository>https://artifacts.b2ihealthcare.com/repository/maven-releases</maven.releases.repository>
<maven.snapshots.repository>https://artifacts.b2ihealthcare.com/repository/maven-snapshots</maven.snapshots.repository>
</properties>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.reficio</groupId>
<artifactId>p2-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>site</goal>
</goals>
<phase>package</phase>
<configuration>
<artifacts>
<artifact>
<id>org.slf4j:log4j-over-slf4j:2.0.11</id>
<override>true</override>
<instructions>
<Bundle-Description>Log4j implemented over SLF4J</Bundle-Description>
<Bundle-DocURL>http://www.slf4j.org</Bundle-DocURL>
<Bundle-License>http://www.apache.org/licenses/LICENSE-2.0.txt</Bundle-License>
<Bundle-Name>Log4j Implemented Over SLF4J</Bundle-Name>
<Bundle-SymbolicName>log4j.over.slf4j</Bundle-SymbolicName>
<Bundle-Vendor>B2i Healthcare</Bundle-Vendor>
<Bundle-Version>${slf4j.version}</Bundle-Version>
<!-- This will ensure that packages will be exported without any version constraints -->
<Export-Package>*;version=1.2.24</Export-Package>
<Import-Package>javax.xml.parsers,org.slf4j;version="[2.0,3)",org.slf4j.spi;version="[2.0,3)",org.w3c.dom</Import-Package>
</instructions>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>none</phase>
</execution>
<execution>
<id>custom-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<groupId>com.b2international.snowowl</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version>
<file>${project.build.directory}/repository/plugins/log4j.over.slf4j_${slf4j.version}.jar</file>
<repositoryId>${maven.repository.id}</repositoryId>
<url>${maven.releases.repository}</url>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<distributionManagement>
<repository>
<id>${maven.repository.id}</id>
<url>${maven.releases.repository}</url>
</repository>
<snapshotRepository>
<id>${maven.repository.id}</id>
<url>${maven.snapshots.repository}</url>
</snapshotRepository>
</distributionManagement>

</project>
8 changes: 1 addition & 7 deletions releng/target-platform/target-platform.target
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<type>jar</type>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<groupId>com.b2international.snowowl</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>2.0.11</version>
<type>jar</type>
Expand All @@ -82,12 +82,6 @@
<version>1.4.14</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>1.2.25</version>
<type>jar</type>
</dependency>
<!-- Jackson CSV/JSON/YAML/XML parsing libraries -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down

0 comments on commit 5ae692b

Please sign in to comment.