distributionManagement isn't really needed in the pom.xml file #34775
Labels
actions
This issue or pull request should be reviewed by the docs actions team
content
This issue or pull request belongs to the Docs Content team
needs SME
This proposal needs review from a subject matter expert
waiting for review
Issue/PR is waiting for a writer's review
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
The text was updated successfully, but these errors were encountered: