Skip to content

(doc) Add FAQ entry for using custom deploy plugin#1388

Merged
kwin merged 1 commit intoapache:masterfrom
Marcono1234:custom-deploy-plugin
Oct 8, 2025
Merged

(doc) Add FAQ entry for using custom deploy plugin#1388
kwin merged 1 commit intoapache:masterfrom
Marcono1234:custom-deploy-plugin

Conversation

@Marcono1234
Copy link
Contributor

Related to google/gson#2892, it is currently not directly clear how Maven Release Plugin can be used with a custom deploy plugin (such as central-publishing-maven-plugin when publishing to Maven Central) and whether the Maven Release Plugin is entagled with the Maven Deploy Plugin.

This pull request adds a new FAQ entry which tries to clarify this.

Warning

The changes here are based on my understanding of how the Maven Release Plugin works, but I might be wrong.
Please let me know if anything of this is incorrect.


Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Comment on lines +34 to +35
However, you can set the <a href="./prepare-mojo.html#autoVersionSubmodules"><code>autoVersionSubmodules</code> parameter</a>
to <code>true</code> to automatically use the parent version.</p>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is not directly related to the new FAQ entry, but since I edited the FAQ anyway I took the chance to change this too.

(I hope I understood the question correctly though.)

This allows you for example to use the <code>central-publishing-maven-plugin</code> when
<a href="https://central.sonatype.org/publish/publish-portal-maven/">deploying to Maven Central</a>.</p>
<p>However, it might be necessary to configure the Maven Deploy Plugin to skip execution because the
plugin is <a href="https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used /current/ here in the URL to use the latest Maven version. But this risks that the link could break in the future. Please let me know if you prefer to hardcode a specific recent Maven version here instead.

<a href="https://central.sonatype.org/publish/publish-portal-maven/">deploying to Maven Central</a>.</p>
<p>However, it might be necessary to configure the Maven Deploy Plugin to skip execution because the
plugin is <a href="https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging">
automatically configured by default</a> (note that some custom deploy plugins automatically disable
Copy link
Contributor Author

@Marcono1234 Marcono1234 Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this "note that some custom deploy plugins automatically disable the Maven Deploy Plugin" because it seems for example central-publishing-maven-plugin automatically disables the Deploy Plugin, see plugin source code (unofficial mirror).

This might confuse users when the Deploy Plugin is not executed without the user having explicitly disabled it.

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>...</version>
Copy link
Contributor Author

@Marcono1234 Marcono1234 Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is using ... as version fine here, or should I instead use the version number of a recent Deploy Plugin release?

Copy link
Member

@kwin kwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@Marcono1234
Copy link
Contributor Author

Marcono1234 commented Oct 8, 2025

Thanks for the review! Is there something else I should do, or does someone else have to review as well before this can be merged?

@kwin kwin merged commit a798fcc into apache:master Oct 8, 2025
20 checks passed
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

@kwin Please assign appropriate label to PR according to the type of change.

@github-actions github-actions bot added this to the 3.2.0 milestone Oct 8, 2025
@kwin kwin added the documentation Improvements or additions to documentation label Oct 8, 2025
@Marcono1234 Marcono1234 deleted the custom-deploy-plugin branch October 8, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants