I expected the stable release to complete successfully
π To Reproduce
Trigger a stable release on another Java repo that uses the default stable publication steps.
Note this error in the GitHub action execution:
Caused by: org.apache.maven.plugin.MojoExecutionException: Presumably you have configured maven-source-plugn to execute twice times in your build. You have to configure a classifier for at least on of them.
Tried numerous things to try to fix this, and may have come to a conclusion but not sure.
At first I think this was because we define the maven-source-plugin in the maven parent release profile, so I removed any references from any of the child projects (even though oddly, some POMs had no reference to this π€ ) - no joy π’
After some additional googling, it seems like this may be because we are calling "duplicate" lifecycle phases in our maven execution. our default is ['mvn', '--quiet', '--errors', '--activate-profiles', 'release', 'clean', 'package', 'site', 'deploy'], and it appears deploy actually runs the package lifecycle phase. When I updated the maven-stable-artifact-phases for roundup, it worked as expected π
Checked for duplicates
Yes - I've already checked
π Describe the bug
In several Java apps, I am encountering failures when trying to tag a stable release:
Others I can't remember right now...
π΅οΈ Expected behavior
I expected the stable release to complete successfully
π To Reproduce
π₯ Environment Info
GitHub Action World
π Version of Software Used
stable
π©Ί Test Data / Additional context
Tried numerous things to try to fix this, and may have come to a conclusion but not sure.
At first I think this was because we define the
maven-source-plugin
in the maven parent release profile, so I removed any references from any of the child projects (even though oddly, some POMs had no reference to this π€ ) - no joy π’Next, I double-triple checked we were doing something like this in our parent POM: https://stackoverflow.com/questions/76305897/maven-build-fails-after-upgrading-to-maven-source-plugin-from-3-2-1-to-3-3-0 . Even removed the phase from configuration in case that has anything to do with it. - no joy π
After some additional googling, it seems like this may be because we are calling "duplicate" lifecycle phases in our maven execution. our default is
['mvn', '--quiet', '--errors', '--activate-profiles', 'release', 'clean', 'package', 'site', 'deploy']
, and it appearsdeploy
actually runs thepackage
lifecycle phase. When I updated the maven-stable-artifact-phases for roundup, it worked as expected πhttps://github.com/NASA-PDS/search-ui-legacy/blob/main/.github/workflows/stable-cicd.yaml#L76
π¦ Related requirements
No response
βοΈ Engineering Details
Let's update the default maven stable artifact build to run