GH-480: Bring back POM revision property (#481)

Fixes: https://github.com/spring-projects/spring-retry/issues/480

* Add `flatten-maven-plugin` to resolve properties
and remove unnecessary build info from the final POM of the artifact to install/deploy

* Revert `version` extraction from POM via `sed` command in the build action
* Remove `flatten.clean` from the Maven Flatter Plugin, since `.flattened-pom.xml` generated file is landed in the `/target` dir
* Add `pomElements/profiles` for removal in the result `.flattened-pom.xml`
This commit is contained in:
Artem Bilan
2025-01-01 18:35:39 -05:00
committed by GitHub
parent 72a0d0e2e3
commit 9131e6a02a
2 changed files with 24 additions and 2 deletions

View File

@@ -39,6 +39,6 @@ runs:
id: read-version
shell: bash
run: |
version=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
version=$(sed -n 's/^.*<revision>\(.*\)<\/revision>.*$/\1/p' pom.xml)
echo "Version is $version"
echo "version=$version" >> $GITHUB_OUTPUT