Class ShadedJar
flink-sql-connector-gcp-* module builds, for the tests that
inspect or run against it.
The two things that differ between those modules — the artifact id and the prefix every bundled package is relocated under — are this type's whole state; everything else about finding and describing the jar is the same for all of them.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Pathbasedir()The calling module's base directory.static ShadedJarpath()Returns the shaded jar intarget/.The same prefix in dot form, as it appears in class names and SPI file names.The prefix this module's relocations move every bundled package under, in slash form.static PathThe calling module'starget/directory.
-
Method Details
-
of
- Parameters:
artifactId- the module's artifact id, e.g.flink-sql-connector-gcp-pubsubshadedPrefix- the relocation prefix in slash form with a trailing slash, e.g.io/github/flink/gcp/connector/pubsub/shaded/
-
shadedPrefix
The prefix this module's relocations move every bundled package under, in slash form. -
shadedPackagePrefix
The same prefix in dot form, as it appears in class names and SPI file names. -
path
Returns the shaded jar intarget/.Found by listing rather than by interpolating
${project.version}, so a version bump does not have to be made here too. The integration-test phase runs afterpackage, so the jar is present by the time any caller runs.The shade plugin leaves the pre-shade jar beside the shaded one as
original-<name>.jar. It is excluded by thestartsWithbelow rather than by a rule of its own — worth knowing before reordering that predicate, because nothing else keeps the unshaded jar out and every assertion built on this would then be about the wrong file.Two matches means a stale jar from an earlier version is still in
target/; runmvn clean.- Throws:
IOException
-
basedir
The calling module's base directory.Resolved from the
project.basedirsystem property the connector parent's surefire configuration sets, rather than from the working directory: the integration-test execution forks, and a relative path does not resolve there. Normalized, becausePath.toAbsolutePath()does not remove a leading.andPath.equals(java.lang.Object)compares name elements — so an unnormalized fallback path could never equal a code-source location it in fact points at. -
targetDir
The calling module'starget/directory.
-