-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix maven deployment issues and flatten pom #28430
Labels
Comments
nollymar
moved this from Current Sprint Backlog
to In Review
in dotCMS - Product Planning
May 7, 2024
This was
linked to
pull requests
May 7, 2024
This was referenced May 10, 2024
dcolina
added a commit
that referenced
this issue
May 10, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
May 11, 2024
### Proposed Changes * Adding the .mvn/maven.config file to set the release version. ### Fixes #28430 Co-authored-by: Daniel Colina <[email protected]>
github-project-automation
bot
moved this from In Review
to Internal QA
in dotCMS - Product Planning
May 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With the maven multi-module deployment into artifactory the pom.xml published is not self-contained and references a parent hierarchy. To be able to build a plugin against dotcms-core module it needs to resolve the parent hierarchy including any top-level default properties set in parent/pom.xml. If when deploying dotcms-core all its parent dependencies are are also deployed with the correct versions then maven can pull each of these in the plugin build. Some of these parent artifacts are not real deployment artifacts and it creates clutter to deploy these separately as well as makes it difficult to identify in the sub module pom exactly which versions of artifacts it is using.
Using the maven-flatten-plugin we are able to resolve and cleanup the submodule pom.xml to resolve all the properties and artifacts as well as remove any unnecessary build information, this allows us to deploy only the important artifacts. This also follows patterns that will come out in Maven 5 which has the concept of a separate deploy pom.xml vs build.
This change also modifies the build in combination with the flatten-maven-plugin to use "ci friendly revisions" pattern for Maven instead of our current Versions Plugin that has to modify the version for each pom.xml before committing to a release branch. Using this pattern allows us to have one file to set the release in a release build as well as being able to easily generate build artifacts for any release version with zero code modifications only using a command line property. See the below link for more information on the pattern
https://maven.apache.org/maven-ci-friendly.html
The text was updated successfully, but these errors were encountered: