ppkarwasz opened a new pull request, #532:
URL: https://github.com/apache/logging-flume/pull/532
logging-parent only exports packages annotated with `@Export`. Since no
Flume package had that annotation, every Flume JAR had an empty `exports` list
in `module-info.class` and no `Export-Package` header, so the modules could not
be used on the module path or in OSGi containers. For example, on the module
path `EnvironmentVariableConfigFilter` fails with:
```
java.lang.IllegalAccessError: superclass access check failed: class
org.apache.flume.configfilter.env.EnvironmentVariableConfigFilter
(in module org.apache.flume.flume.environment.variable.config.filter) cannot
access class org.apache.flume.configfilter.AbstractConfigFilter
(in module org.apache.flume.flume.config.filter.api) because module
org.apache.flume.flume.config.filter.api does not export
org.apache.flume.configfilter
```
This PR:
- Adds a `package-info.java` with `@Export` and `@Version("2.0.0")` to every
non-internal package (41 packages in 17 modules).
- Manages `org.osgi.annotation.bundle` and `org.osgi.annotation.versioning`
in `flume-parent` with `provided` scope, and declares them in each module.
The following packages are **not** exported:
- `org.apache.flume.conf.internal` and `org.apache.flume.node.internal`:
internal by design. `conf.internal` is also used by `flume-file-channel` and
`flume-node`, but it only contains the `SuppressFBWarnings` annotation, so
there is no runtime reference.
- `org.apache.flume.source.shaded.guava`: vendored Guava code, used only by
`StressSource`.
- `org.apache.flume.channel.file.proto`: generated Protobuf classes of the
file channel's on-disk format.
Classpath usage, which `bin/flume-ng` relies on, is unaffected.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]