Conversation
Set an Automatic-Module-Name manifest attribute on every published artifact, derived from the group id plus a trailing element based on the artifact name (e.g. testcontainers-junit-jupiter -> org.testcontainers.junitjupiter, core -> org.testcontainers.core). The attribute is added to the jar manifest and inherited by the published shadowJar.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe publishing configuration adds an ChangesModule Naming
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change is limited to adding stable module names to published artifacts without affecting existing manifest entries or BOM publication. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Any chance to consider this? |
What
Adds a JPMS
Automatic-Module-Namemanifest attribute to every published artifact.The name is derived from the group id (
org.testcontainers) plus a single trailing element based on the artifact name, with hyphens collapsed:Automatic-Module-Nametestcontainers(core)org.testcontainers.coretestcontainers-mysqlorg.testcontainers.mysqltestcontainers-junit-jupiterorg.testcontainers.junitjupitertestcontainers-oracle-freeorg.testcontainers.oraclefreetestcontainers-database-commonsorg.testcontainers.databasecommonsWhy
Giving consumers stable module names lets them
requiresTestcontainers from amodule-info.javawithout depending on the unstable filename-derived automatic name.How
A single addition to
gradle/publishing.gradle, which is already applied to exactly the set of published projects. The attribute is set on thejarmanifest and inherited by the publishedshadowJar. This keeps the change minimal and leaves non-published artifacts (e.g.test-support,jdbc-test) untouched. Existing manifest attributes (such as core'sImplementation-Version) are preserved.Summary by CodeRabbit