-
Notifications
You must be signed in to change notification settings - Fork 269
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
[Bug 2.3] Local aggregation root is searched to set the version #82
Comments
I think that the local agregator is not used directly to define what projects will change. If you want to change the version of one project only, make the maven call from that project. If the version is inherited from a parent pom, you can make the maven call from the parent pom and use the |
I do think it is used because I changed that piece of code to getProject and only the local pom and all the other modules it defined are changed. You cannot assume automatically that I want to change the whole hierarchy of my maven project everybody is free to organise it as it wishes and my pom versions are evolving independently. So I think it is a bug. Because I have no easy way to get around this behaviour. |
This is also problematic for me. I have a fork of two-module project living under a parent in the repository. Both modules inherit from the Spring Boot parent and NOT the reactor that is aggregating them. When trying to
And this is invoked from |
I think I am running into the same problem as @dweomer. Has anyone found a workaround for this? |
I should also note that I see the exact same failure when invoking from the parent directing but specify the module via the |
Does someone has an example project for that? |
@khmarbaise, please find a sample project attached: |
i run into this problem as well when using gitflow-maven-plugin which uses due to this bug other versions in the same git repository but outside the directory/module structure that is released are (automatically) modified as well and are part of the release commits. in PR #400 i've added an IT for the problem and a fix - i've just removed the lookup of parent POMs to do the change - it makes no sense in my POV and none of the other ITs relayed on it. |
…ld directories), not the parent or sibling directories
I haven't fully gone through all the details above, but our project is now broken upon upgrading to We have a setup:
Where On On |
@sirianni you're right - this is no longer working. in my pov the new behavior is correct - with the but of course it see that your use case makes sense. did you check if any of the other goals can be used instead? alternatively we might think about adding a new switch to this goal that restored the previous behavior, but only if explicitly wanted as it can lead to unexpected results in other scenarios (that's why this bug exists). |
I think this change should be reverted as it breaks for my use-case. I have checked the other goals and none of them seem to work, I tried the update-parent goal but all it says is 'Project's parent is part of reactor' or 'Project version is inherited from parent' and no changes are made to the pom.xml |
see my comment in #426 (comment) - would this help for you? |
…s of the local aggregation root that was present before the fix for #82 introduce a new flag processFromLocalAggregationRoot that enables the new (and probably more correct) behavior by setting it it false ensure old and new behavior are covered by integration tests
I think this peace of code from the SetMojo.java is not correct.
final MavenProject project = PomHelper.getLocalRoot( projectBuilder, getProject(), localRepository, null, getLog() ); getLog().info( "Local aggregation root: " + project.getBasedir() );
I end with my all project modified despite I only wanted to change a one maven module. It automatically searches for the local aggregator root which I think it should not.
The text was updated successfully, but these errors were encountered: