-
Notifications
You must be signed in to change notification settings - Fork 40
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
Skip sub-projects of deselected projects #328
Comments
Thanks for reporting this! In your example, are C, D etc. referencing B as their parent or not? This makes a difference because Maven considers C a downstream module of B when there is such a parent relationship. |
I tested this briefly and when there is such a parent relation, PS: I haven't tested the non-parent variant yet. |
I am so sorry, you're right. During my manual tests I forgot to add the required profiles of the sub-modules... I don't know if there is a "Maven way" to achieve what I want (build everything except B and its sub-modules, without having to list all of them) |
No worries! Maven 4 will actually make The problem with a custom implementation is that all upstream/downstream calculation in GIB is currently based on Maven core |
@don-vip In case there is also a module X under A (sibling of B), that depends on B or any of its sub-modules: Would you expect GIB to build X in case B or any of its sub-modules is changed but B is excluded (and its sub-modules)? |
Good question. It doesn't make sense in my project. If it was the case I think I would exclude X as well. So I don't know what would be the best choice for GIB behaviour here. |
Well, not building X in that case is the complicated part because GIB would need to evaluate all of its upstream modules to figure out whether is should be excluded or not. A graph analysis so to say, which can be rather slow for big repos if not done cleverly. I think I'll have a look at how Maven 4 alpha behaves but I suppose the new recursive behavior of |
Status: I didn't have the time to look into this in detail for 3.14.0 (which I will release today) but I think we'll need a new GIB property for this, e.g. |
From documentation:
Since 3.10.1, "deselected" projects (mvn -pl !...) that contain changes will not be built, but their up- and downstream projects will be built (if not also deselected).
The behaviour concerning sub-modules is not specified. In this example:
A
When I run
mvn -pl '!:B' -Dgib.disable=true
, Maven reactor excludes all modules under B.But when I run
mvn -pl '!:B'
, gib sees that D is changed and builds it.Is it a bug or intended behaviour? If that's intended it would be great to have a configuration option to change this behaviour.
The text was updated successfully, but these errors were encountered: