docs
docs copied to clipboard
distributionManagement isn't really needed in the pom.xml file
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-java-packages-with-maven
What part(s) of the article would you like to see updated?
Instead of messing with the distributionManagement xml element in the pom.xml file you could just change the mvn command to mvn --batch-mode -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }} deploy
. It's way easier than copy/paste/editing the fragment of xml and integrating it into some kind of parent pom and keeping these ids in sync.
The user property is documented here: https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#altDeploymentRepository
I guess you could keep the distributionManagement stuff for people who prefer to do it that way.
Additional information
No response