Skip sub-projects of deselected projects
See original GitHub issueFrom 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
- B < I want to ignore all projects under B
- C
- D < a file is changed here
- E, F, G… Many many more sub-projects
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.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Conditionally skip subproject in multi-module Gradle build
To clarify; each subproject has a property called skip that is evaluated in the configuration phase. Now when I call gradlew build on...
Read more >Having a master project open locks all subprojects, even ...
Having a master project open locks all subprojects, even though we did not 'link to project'. Hi, I am having two issues with...
Read more >Microsoft Project Removing Sub Projects From Master Projects
On the Advanced tab, deselect the checkbox “Link to project” and click “OK”; When prompted to save changes to the subproject, click “Yes”;...
Read more >Reordering Tasks in Master Project with MICROSOFT ...
I want to be able to re-order the tasks in the master project but want them to stay in the same order for...
Read more >Gradle projects | IntelliJ IDEA Documentation - JetBrains
It might be helpful if you need to skip an irrelevant subproject such as buildSrc. In the Gradle tool window, right-click the project...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No worries!
Maven 4 will actually make
-pl
recursive, so that-pl B
will build B and all its sub-modules and-pl !B
will neither build B nor its sub-modules. The old behavior can be brought back with-N -pl ...
.The problem with a custom implementation is that all upstream/downstream calculation in GIB is currently based on Maven core
DependencyGraph
(well, except a part of the BOM support). I’ll leave this open for now and think about this a bit more…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.
-Dgib.excludeDownstreamModules=B
or similar, probably with wildcard support.