Prevent example modules from being published to Maven Central#1127
Merged
Conversation
The scim-server-examples/* demos are intentionally not production-hardened (cleartext passwords, no auth/TLS) and must never appear as consumable artifacts. Previously nothing in the build prevented a full reactor deploy from staging them. Introduce an intermediate parent POM at scim-server-examples/pom.xml (groupId org.apache.directory.scimple.examples, packaging pom) that sets maven.deploy.skip and skipNexusStagingDeployMojo once, plus pluginManagement overrides that skip the source, gpg, and javadoc plugins for the examples. The six example modules inherit from it, so future examples are non-publishing by default. The root reactor now references the single scim-server-examples aggregator. The skip behavior lives in pluginManagement rather than build/plugins and an apache-release profile: the plugins are already bound elsewhere (nexus-staging in the root reactor's build, source/gpg/javadoc by the ASF apache-release profile), so management-only config overrides them uniformly across every example module without forcing new plugin bindings. scim-coverage is deliberately left untouched: it is the last reactor module and is where nexus-staging triggers the deferred batch upload, so skipping it would suppress publishing of the real libraries. A comment marks it as required-last.
5af57d8 to
1d4121e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Introduce an intermediate parent POM at
scim-server-examples/pom.xml(groupIdorg.apache.directory.scimple.examples,packaging=pom) that makes the example modules non-publishing, and reparent the six examples under it.Why
The
scim-server-examples/*demos are intentionally not production-hardened (cleartext passwords, no auth/TLS). They are documented as out of scope and "not published to Maven Central", but nothing in the build actually enforced that — a full reactordeploywould have staged them. This makes that guarantee structural rather than aspirational.How
scim-server-examples/pom.xmlsetsmaven.deploy.skipandskipNexusStagingDeployMojoonce, plus anapache-releaseprofile that skips the source, gpg, and javadoc plugins for the examples.scim-server-examplesaggregator instead of the six individual modules.scim-coverageis deliberately left untouched. It is the last reactor module, which is wherenexus-staging-maven-plugintriggers the deferred batch upload — skipping it would suppress publishing of the real libraries. A comment marks it as required-last.The set of published modules (
scim-spec-schema,scim-spec-protocol,scim-client,scim-core,scim-server,scim-spring-boot-starter, and the test-support artifacts) is unchanged.Verification
Local,
-Pci:./mvnw -Pci -DskipTests verify— BUILD SUCCESS across all modules (RAT + SpotBugs clean).Skipping Nexus Staging Deploy Mojo at user's demand., whilescim-coreandscim-serverperform deferred deploys — confirming the skip does not leak to the published libraries.