gnodet opened a new pull request, #413: URL: https://github.com/apache/maven-archiver/pull/413
## Summary Adds `BuildHelper.isDeployable(Model)` to detect whether a Maven module will be deployed to a remote repository, as requested in #304. ## Background Several plugins (maven-artifact-plugin, cyclonedx-maven-plugin) need to know whether a module is going to be deployed in order to adapt their behaviour (skip generating artifacts for reactor-only modules). Each currently re-implements its own detection. This method centralises the logic in `BuildHelper`, which already exists for similar cross-cutting build introspection (e.g. `discoverJavaRelease`). The algorithm is aligned with the one recently merged into [cyclonedx-maven-plugin#604](https://github.com/CycloneDX/cyclonedx-maven-plugin/pull/604) and ported from the Maven 3 API (`MavenProject`/`Xpp3Dom`) to the Maven 4 API (`Model`/`XmlNode`). ## Three supported deployment mechanisms Checked in priority order: 1. **`central-publishing-maven-plugin`** (new Sonatype Central Portal): presence means it replaces `maven-deploy-plugin`. Module is deployable if a `publish` execution exists and is not skipped via `skipPublishing`. 2. **`nexus-staging-maven-plugin`** (legacy Sonatype OSS): presence means it replaces standard deploy. Module is deployable if a `deploy` execution exists and is not skipped via `skipNexusStagingDeployMojo`. 3. **`maven-deploy-plugin`** (standard): module is deployable if a `deploy` execution exists and is not skipped via `skip` / `maven.deploy.skip`. A module with none of these plugins configured is deployable by default. Execution-level configuration overrides plugin-level properties. ## Tests 16 new unit tests in `BuildHelperTest` covering all three paths, property fallback, execution-level config override, and precedence between extension plugins and the standard deploy plugin. All 113 tests pass. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
