Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kevinhooke/3244c4827ec66c27ffc699312eb3f509 to your computer and use it in GitHub Desktop.
Save kevinhooke/3244c4827ec66c27ffc699312eb3f509 to your computer and use it in GitHub Desktop.
Maven multi-module projects and version properties - flatten-maven-plugin
If building multi-module projects and publishing/installing to a repo, version properties like ${revision} are not
consistently replaced at install time. This results in errors when attempting to refer to one of these modules
as a dependency from another project, and instead of library:1.0.0 resolving, you'll see an error where
it's attempting to reference library:${revision} instead.
See discussion here:
https://stackoverflow.com/questions/41086512/maven-issue-to-build-one-module-using-revision-property
To fix, to need to add the flatten-maven-plugin:
https://maven.apache.org/guides/mini/guide-maven-ci-friendly.html#install-deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment