Skip to content
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

UpdatePropertiesMojo causes Maven to parse every pom twice #25

Open
andrzejj0 opened this issue Feb 26, 2024 · 0 comments
Open

UpdatePropertiesMojo causes Maven to parse every pom twice #25

andrzejj0 opened this issue Feb 26, 2024 · 0 comments
Assignees

Comments

@andrzejj0
Copy link
Owner

andrzejj0 commented Feb 26, 2024

Currently, UpdatePropertiesMojoBase concrete classes only update the currently Maven-processed file as they are non-aggregate plugins. As such, they rely on Maven recursing into every project of the reactor and then do their job. Maven parses the POM before executing the plugin and it also resolves the properties available in the active profiles.

In order to be able to create property associations, the plugin will then build a tree starting from the child to the parent and parse the untreated POMs of the parents to find the properties. As such, we are actually parsing the POMs for the second time, and what's worse, we're doing that again for every child and also every sibling of the current project in the reactor. That's a lot of wasted work.

At the same time, we are still unable to change the properties which are defined somewhere above in the reactor tree but still within the reactor. See mojohaus#997

The goal of this exercise is to create a new implementation for the mojo(s), and most likely enable/disable it using a feature switch.

@andrzejj0 andrzejj0 self-assigned this Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant