-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make sure all the project modules are loaded into workspace in case the root pom does not declare any #16138
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some small comments.
I confirm I want this in a micro before backporting to 1.11 :).
final Model model = readModel(pomFile); | ||
cachedModels.put(pomFile.getParent(), model); | ||
private LocalProject loadAndCache(Path pomFile) throws BootstrapMavenException { | ||
final LocalProject model = new LocalProject(readModel(pomFile), workspace); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor but maybe you should rename the variable for more clarity?
if (workspace.getCurrentProject() == null) { | ||
load(null, currentProjectPom); | ||
private LocalProject loadProjectWithModules(Path projectPom, String skipModule) throws BootstrapMavenException { | ||
final LocalProject project = model(projectPom); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model()
method should probably be renamed too?
@@ -138,6 +138,27 @@ public void loadWorkspaceWithDirBreaks() throws Exception { | |||
assertEquals(4, ws.getProjects().size()); | |||
} | |||
|
|||
@Test | |||
//@Disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed, right?
…he root pom does not declare any
a1c5b43
to
5d974ba
Compare
@gsmet all done |
Just in case, this is the failure
|
@michalszynkiewicz could you have a look at the failure above? |
@geoand do you have time to take a look at the failure? It's the test you modified. |
I'll take a look |
Here it is #16187 |
Relates to: quarkusio#16138 (comment) (cherry picked from commit eef926f)
@aloubyansky it looks like this needs to be backported to |
Right |
@gsmet I am re-adding the backport label |
It looks like the milestone has already been set to 1.13.1.Final |
It's actually been backported already to 1.13. |
Ah, OK |
Fixes a bug in the bootstrap Maven workspace discovery when the current project is located deep in the module hierarchy and the root pom doesn't happen to list any modules.