question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Skip sub-projects of deselected projects

See original GitHub issue

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

  • 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:open
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
famodcommented, May 19, 2021

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…

0reactions
famodcommented, Apr 5, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found