Class AbstractBundledDependenciesNoticeTest

java.lang.Object
io.github.flink.gcp.connector.testutils.sql.AbstractBundledDependenciesNoticeTest

@Internal public abstract class AbstractBundledDependenciesNoticeTest extends Object
Keeps a flink-sql-connector-gcp-* module's META-INF/NOTICE honest: it must list every artifact the uber-jar bundles, and nothing it does not.

This is the check that makes a libraries-bom bump fail the build: artifactSet is *:*, so a new transitive is bundled automatically and the only thing that can go unrecorded is the paperwork. Both failure directions — an undeclared bundled dependency and a stale NOTICE entry for something no longer bundled — are caught here.

Reads the dependency list maven-dependency-plugin records at generate-test-resources, so it describes this build rather than a remembered one. That list is includeScope=runtime, so an artifact the module deliberately keeps out of the bundle by declaring it provided is absent from both sides and needs no exemption here.

scripts/check-notice.py checks this same property and more — it also compares the licence each artifact is filed under against the one its POM declares, and verifies the META-INF/licenses/ files. The overlap is deliberate: that comparison is a Python script rather than a Maven plugin, so it runs as its own CI step, and this test is what makes the same drift fail inside just verify, where a developer sees it immediately. (The half that *resolves* the licences is bound into the build, so both are current for the same commit.)

  • Constructor Details

    • AbstractBundledDependenciesNoticeTest

      public AbstractBundledDependenciesNoticeTest()
  • Method Details

    • minimumBundledArtifacts

      protected abstract int minimumBundledArtifacts()
      A floor below which both parsed lists are assumed to be a parsing failure rather than a real bundle.

      Per module rather than shared, because a shared floor is only as strong as the smallest tree it has to admit: at 40 it would be vacuous for a tree three times that size, which is the size of the second one. Set it a little below the current count — it exists to catch "the regex matched nothing", not to pin the dependency count, which the comparison itself already does exactly.