Skip to content

Adapt the build to logging-parent conventions#467

Open
ppkarwasz wants to merge 7 commits into
trunkfrom
feat/logging-parent-migration2
Open

Adapt the build to logging-parent conventions#467
ppkarwasz wants to merge 7 commits into
trunkfrom
feat/logging-parent-migration2

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

Follow-up to #464: makes the whole reactor build green under the logging-parent conventions.

  • Adapt build to logging-parent conventions: flume-parent now inherits most build configuration from logging-parent and the apache parent POM. ZooKeeper is bumped to 3.9.3 to satisfy requireUpperBoundDeps.
  • Expand star imports: required by the formatting rules inherited from logging-parent.
  • Fix or suppress Error Prone warnings:
    • the GuardedBy suppressions in MemoryChannel and SpillableMemoryChannel are intentional, so we add @SuppressWarnings annotations,
    • a boxed Integer lock in tests have been replaced with an Object lock,
    • a never-run test,
    • an ignored return value,
    • and a self-catching assertion.
  • Disable BND baseline for never-released artifacts: six artifacts have no published version on Maven Central to compare against (verified against repo1.maven.org).
  • Configure RAT exclusions via .rat-excludes: the file is read by the Maven build (through a file-activated profile, so repositories without the file are unaffected) and by the ASF Trusted Releases platform RAT check.

Most build configuration is now inherited from `logging-parent` and the
`apache` parent POM. ZooKeeper is bumped to satisfy `requireUpperBoundDeps`.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
The formatting rules inherited from `logging-parent` forbid wildcard imports.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
The `GuardedBy` suppressions are intentional: the channel queue locks must
not be held on blocking operations and the unguarded reads are benign.
The `jvm.config` flags let Error Prone access javac internals on JDK 16+.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
These artifacts have no published version to compare against.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
The file is shared with the ASF Trusted Releases platform checks, which
match patterns against the archive root: hence the `**/` prefix. Files
that support comments get an SPDX header instead of an exclusion.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns the logging-flume multi-module Maven build with logging-parent conventions, aiming to restore a “green” reactor build while keeping Flume-specific build behavior (RAT exclusions, formatting/import rules, Error Prone suppressions) working under the new parent setup.

Changes:

  • Switch parent POM inheritance and related build metadata/configuration to org.apache.logging:logging-parent, including dependency alignment (e.g., ZooKeeper bump) to satisfy enforcer rules.
  • Adjust formatting/import style to expand star imports, and address Error Prone warnings via targeted suppressions and small test fixes.
  • Add/enable RAT and BND-baseline related configuration to work cleanly for this repo (e.g., .rat-excludes-driven exclusions and disabling baseline for never-released artifacts).

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pom.xml Adds a file-activated profile to feed RAT exclusions from a root .rat-excludes file when present.
flume-third-party/pom.xml Bumps ZooKeeper version to align dependency bounds.
flume-parent/pom.xml Moves Flume parent to inherit from logging-parent, updates metadata, build properties, dependency management, Spotless/RAT profile integration.
flume-ng-sources/flume-taildir-source/src/main/java/org/apache/flume/source/taildir/TaildirSource.java Expands static-import wildcard into explicit constant imports per formatting rules.
flume-ng-sources/flume-syslog-source/src/test/java/org/apache/flume/source/syslog/TestSyslogUtils.java Replaces wildcard static import with explicit Netty buffer import.
flume-ng-sources/flume-syslog-source/src/test/java/org/apache/flume/source/syslog/TestMultiportSyslogTCPSource.java Narrows Mockito static imports to the specific methods used.
flume-ng-sources/flume-syslog-source/pom.xml Disables BND baseline failure on missing prior release for this artifact.
flume-ng-sources/flume-netcat-source/pom.xml Disables BND baseline failure on missing prior release for this artifact.
flume-ng-sources/flume-http-source/src/test/java/org/apache/flume/source/http/TestHTTPSource.java Cleans up assertions and replaces self-catching assertion with Assert.assertThrows.
flume-ng-sources/flume-http-source/pom.xml Disables BND baseline failure on missing prior release for this artifact.
flume-ng-node/src/test/java/org/apache/flume/node/TestApplication.java Replaces Mockito wildcard static import with explicit imports.
flume-ng-instrumentation/flume-prometheus-monitor/src/main/resources/META-INF/services/org.apache.flume.instrumentation.MonitorService Adds SPDX comment line to ServiceLoader file.
flume-ng-instrumentation/flume-prometheus-monitor/pom.xml Disables BND baseline failure on missing prior release for this artifact.
flume-ng-instrumentation/flume-http-monitor/src/main/resources/META-INF/services/org.apache.flume.instrumentation.MonitorService Adds SPDX comment line to ServiceLoader file.
flume-ng-instrumentation/flume-http-monitor/pom.xml Disables BND baseline failure on missing prior release for this artifact.
flume-ng-instrumentation/flume-ganglia-monitor/src/main/resources/META-INF/services/org.apache.flume.instrumentation.MonitorService Adds SPDX comment line to ServiceLoader file.
flume-ng-instrumentation/flume-ganglia-monitor/pom.xml Disables BND baseline failure on missing prior release for this artifact.
flume-ng-core/src/test/java/org/apache/flume/tools/TestVersionInfo.java Replaces JUnit Assert wildcard import with explicit assert imports.
flume-ng-core/src/test/java/org/apache/flume/TestContext.java Replaces JUnit Assert wildcard import with explicit assert imports.
flume-ng-core/src/test/java/org/apache/flume/source/TestBasicSourceSemantics.java Replaces Mockito wildcard static import with explicit imports.
flume-ng-core/src/test/java/org/apache/flume/source/TestAbstractPollableSource.java Replaces Mockito wildcard static import with explicit import(s).
flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannelConcurrency.java Replaces boxed Integer lock with Object lock.
flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannel.java Marks a previously non-run test as @Ignore (skipped) under JUnit.
flume-ng-core/src/main/java/org/apache/flume/interceptor/TimestampInterceptor.java Expands static-import wildcard into explicit constant imports per formatting rules.
flume-ng-core/src/main/java/org/apache/flume/interceptor/HostInterceptor.java Expands static-import wildcard into explicit constant imports per formatting rules.
flume-ng-core/src/main/java/org/apache/flume/event/EventHelper.java Removes an unused toString() call on a StringBuilder mutation result.
flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java Adds targeted @SuppressWarnings("GuardedBy") annotations to address Error Prone warnings.
flume-ng-core/pom.xml Removes explicit plugin versions to defer to parent-managed plugin versioning.
flume-ng-configuration/src/test/java/org/apache/flume/conf/TestFlumeConfiguration.java Expands static imports for enum constants (no wildcard) per formatting rules.
flume-ng-configuration/src/test/java/org/apache/flume/conf/TestAgentConfiguration.java Replaces JUnit Assert wildcard import with explicit assert imports.
flume-ng-configfilters/flume-ng-external-process-config-filter/src/test/resources/test.sh Adds SPDX comment line to test script.
flume-ng-configfilters/flume-ng-external-process-config-filter/src/test/resources/test_error.sh Adds SPDX comment line to test script (and blank line).
flume-ng-channels/flume-spillable-memory-channel/src/main/java/org/apache/flume/channel/SpillableMemoryChannel.java Adds targeted @SuppressWarnings("GuardedBy") annotations to address Error Prone warnings.
flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java Replaces Fest Reflection wildcard static import with explicit field import.
flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestCheckpointRebuilder.java Expands TestUtils wildcard static import into explicit imports.
.rat-excludes Introduces repository-level RAT exclusions file for build and ASF RAT checks.
.mvn/jvm.config Adds JVM module-open/export flags for the Maven JVM to support tooling under Java 17+.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannel.java Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ppkarwasz

Copy link
Copy Markdown
Member Author

The use of .rat-excludes file instead of adding the exclusion to the Apache RAT configuration is compatible with the changes proposed in apache/logging-parent#502.

@ppkarwasz
ppkarwasz enabled auto-merge (rebase) July 24, 2026 15:16
auto-merge was automatically disabled July 24, 2026 15:36

Rebase failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants