You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://bnd.bndtools.org/chapters/170-versioning.html#best-practices[OSGi versioning best practices], both Log4j artifacts and packages are versioned.
185
+
If you modify Log4j's public API, a BND Baseline error like the following will occur:
186
+
187
+
[source]
188
+
----
189
+
Name Type Delta New Old Suggest If Prov.
190
+
org.apache.logging.foo PACKAGE UNCHANGED 2.1.0 2.1.0 ok -
191
+
* org.apache.logging.foo.bar PACKAGE MINOR 2.3.4 2.3.4 2.4.0 -
192
+
MINOR PACKAGE org.apache.logging.foo.bar
193
+
...
194
+
----
195
+
196
+
The solution of the error depends on the change kind (`Delta`):
197
+
198
+
[#development-api-compatibility-micro]
199
+
`MICRO`::
200
+
+
201
+
For patch level changes modify the `package-info.java` file of the `org.apache.logging.foo.bar` package and update the `@Version` annotation to the number suggested by BND: increment just the patch number.
202
+
+
203
+
[source,java]
204
+
----
205
+
@Version("2.3.5")
206
+
package org.apache.logging.foo.bar;
207
+
----
208
+
209
+
[#development-api-compatibility-minor]
210
+
`MINOR`::
211
+
+
212
+
Changes of type `MINOR` require more work:
213
+
+
214
+
--
215
+
* Make sure that the current Log4j version is a minor upgrade over the last released version.
216
+
If that is not the case (e.g., it is `2.34.5-SNAPSHOT`) modify the `<revision>` property in the main POM file (e.g., change it to `2.35.0-SNAPSHOT`).
modify the `package-info.java` file of the package and update the `@Version` annotation to the **next Log4j version** (`2.35.0` in the example) and **not** the minimal version number suggested by BND.
223
+
The purpose of this policy is to have an alignment between package versions and the last Log4j version, where an API change occurred.
224
+
--
225
+
226
+
[#development-api-compatibility-major]
227
+
`MAJOR`::
228
+
+
229
+
Changes of type `MAJOR` (i.e. breaking changes) are not accepted in the `2.x` branch.
230
+
If you believe it is not a breaking change (e.g., you removed a class **documented** as private), the development team will guide you on how to solve it.
0 commit comments