Skip to content

Commit a19639e

Browse files
committed
Use @BaselineIgnore instead of packages exclusions
1 parent 96fa0fd commit a19639e

File tree

8 files changed

+9
-81
lines changed

8 files changed

+9
-81
lines changed

log4j-api/pom.xml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -107,47 +107,6 @@
107107
</executions>
108108
</plugin>
109109

110-
<!--
111-
~ Remove the following plugin executions after `2.22.0` release!
112-
~ In `2.22.0`, we have removed protected methods from the final (or effectively final) classes:
113-
~ * org.apache.logging.log4j.Level,
114-
~ * org.apache.logging.log4j.util.ProviderUtil.
115-
~
116-
~ BND considers this a major API break.
117-
-->
118-
<plugin>
119-
<groupId>biz.aQute.bnd</groupId>
120-
<artifactId>bnd-baseline-maven-plugin</artifactId>
121-
<configuration>
122-
<diffpackages>
123-
<diffpackage>!org.apache.logging.log4j</diffpackage>
124-
<diffpackage>!org.apache.logging.log4j.util</diffpackage>
125-
<diffpackage>*</diffpackage>
126-
</diffpackages>
127-
</configuration>
128-
</plugin>
129-
<plugin>
130-
<groupId>org.apache.maven.plugins</groupId>
131-
<artifactId>maven-enforcer-plugin</artifactId>
132-
<executions>
133-
<execution>
134-
<id>remove-after-release</id>
135-
<goals>
136-
<goal>enforce</goal>
137-
</goals>
138-
<configuration>
139-
<rules>
140-
<requireProperty>
141-
<property>revision</property>
142-
<regex>2\.22\.0(-SNAPSHOT)?</regex>
143-
<regexMessage>Remove `bnd-baseline-maven-plugin` config in `log4j-api`.</regexMessage>
144-
</requireProperty>
145-
</rules>
146-
</configuration>
147-
</execution>
148-
</executions>
149-
</plugin>
150-
151110
</plugins>
152111
</build>
153112
</project>

log4j-api/src/main/java/org/apache/logging/log4j/Level.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.concurrent.ConcurrentHashMap;
2222
import java.util.concurrent.ConcurrentMap;
2323

24+
import aQute.bnd.annotation.baseline.BaselineIgnore;
2425
import org.apache.logging.log4j.spi.StandardLevel;
2526
import org.apache.logging.log4j.util.Strings;
2627

@@ -75,6 +76,7 @@
7576
* used in logging configurations.
7677
* </p>
7778
*/
79+
@BaselineIgnore("2.22.0")
7880
public final class Level implements Comparable<Level>, Serializable {
7981

8082
private static final Level[] EMPTY_ARRAY = {};

log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ public StructuredDataId makeId(final String defaultId, final String anEnterprise
252252
* @deprecated Use {@link StructuredDataId#makeId(String, String)} instead
253253
*/
254254
@Deprecated
255-
@InlineMe(replacement = "this.makeId(defaultId, String.valueOf(anEnterpriseNumber))")
256255
public StructuredDataId makeId(final String defaultId, final int anEnterpriseNumber) {
257256
return makeId(defaultId, String.valueOf(anEnterpriseNumber));
258257
}

log4j-api/src/main/java/org/apache/logging/log4j/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @see <a href="http://logging.apache.org/log4j/2.x/manual/api.html">Log4j 2 API manual</a>
3333
*/
3434
@Export
35-
@Version("2.20.1")
35+
@Version("2.20.2")
3636
package org.apache.logging.log4j;
3737

3838
import org.osgi.annotation.bundle.Export;

log4j-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import aQute.bnd.annotation.Cardinality;
3030
import aQute.bnd.annotation.Resolution;
31+
import aQute.bnd.annotation.baseline.BaselineIgnore;
3132
import aQute.bnd.annotation.spi.ServiceConsumer;
3233
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3334
import org.apache.logging.log4j.Logger;
@@ -40,6 +41,7 @@
4041
* {@link #loadProvider(java.net.URL, ClassLoader)} a classpath accordingly.
4142
*/
4243
@InternalApi
44+
@BaselineIgnore("2.22.0")
4345
@ServiceConsumer(value = Provider.class, resolution = Resolution.OPTIONAL, cardinality = Cardinality.MULTIPLE)
4446
public final class ProviderUtil {
4547

log4j-api/src/main/java/org/apache/logging/log4j/util/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* There are no guarantees for binary or logical compatibility in this package.
2121
*/
2222
@Export
23-
@Version("2.21.0")
23+
@Version("2.22.0")
2424
package org.apache.logging.log4j.util;
2525

2626
import org.osgi.annotation.bundle.Export;

log4j-core/pom.xml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -296,42 +296,6 @@
296296
</executions>
297297
</plugin>
298298

299-
<!-- Remove the following plugin executions after `2.22.0` release!
300-
In `2.22.0`, we have removed *unused* `FastDateParser` due to LOG4J2-3672 and #1848.
301-
Though `bnd-baseline-m-p` doesn't allow such breaking changes in non-major version upgrades.
302-
Hence, we suppress it until `2.22.0` gets released. -->
303-
<plugin>
304-
<groupId>biz.aQute.bnd</groupId>
305-
<artifactId>bnd-baseline-maven-plugin</artifactId>
306-
<configuration>
307-
<diffpackages>
308-
<diffpackage>!org.apache.logging.log4j.core.util.datetime</diffpackage>
309-
<diffpackage>*</diffpackage>
310-
</diffpackages>
311-
</configuration>
312-
</plugin>
313-
<plugin>
314-
<groupId>org.apache.maven.plugins</groupId>
315-
<artifactId>maven-enforcer-plugin</artifactId>
316-
<executions>
317-
<execution>
318-
<id>remove-after-release</id>
319-
<goals>
320-
<goal>enforce</goal>
321-
</goals>
322-
<configuration>
323-
<rules>
324-
<requireProperty>
325-
<property>revision</property>
326-
<regex>2\.22\.0(-SNAPSHOT)?</regex>
327-
<regexMessage>Remove `bnd-baseline-maven-plugin` config in `log4j-core`.</regexMessage>
328-
</requireProperty>
329-
</rules>
330-
</configuration>
331-
</execution>
332-
</executions>
333-
</plugin>
334-
335299
</plugins>
336300
</build>
337301
</project>

log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/package-info.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
* Log4j 2 date formatting classes.
1919
*/
2020
@Export
21-
@Version("2.21.0")
21+
@Version("2.21.1")
22+
@BaselineIgnore("2.22.0")
2223
package org.apache.logging.log4j.core.util.datetime;
2324

25+
import aQute.bnd.annotation.baseline.BaselineIgnore;
2426
import org.osgi.annotation.bundle.Export;
2527
import org.osgi.annotation.versioning.Version;

0 commit comments

Comments
 (0)