-
Notifications
You must be signed in to change notification settings - Fork 446
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
Question: Is multi-module maven projects compiled using multiple threads? #3380
Comments
@tsaarni You may want to take a look at #2537 (comment) |
Thanks @snjeza 😅 I did try that then, but it ended being impossible to come up with a working set of exclusions for that project. Also, Keycloak luckily changed to direction that it was possible to work with it in vscode, until now. To answer to my own question about if maven projects are executed in parallel by vscode-java: no, I do not believe so. I have now learned that the maven implementation used is called m2eclipse or m2e and that it sometimes acts differently compared to maven, in this case in context of maven-replacer-plugin and frontend-maven-plugin, which were recently introduced to the project. After investigating this, I do not think there is any settings on vscode-java side that would help. |
@tsaarni could you try the following:
|
Really big thanks @snjeza for helping me understand the problem! What I believe is happening, is that m2e will run |
|
From the doc I understood the default is "ignore". |
@snjeza Sorry to bother again. I wonder if you know what happens to output from maven modules when they are run via m2e and how to get access to the logs? The logs from language server will just have mojo exceptions, but nothing else. I've even tried modifying the maven module(s) to print to stdout but I cannot see them. The output is visible when running |
@tsaarni You can try to add
|
Thank you again @snjeza. I did not manage to get output so I ended up modifying the maven plugin to write output to Here is a summary of my problems with Keycloak:
Issue (1) can be worked around by setting Issue (2) can be worked around by appending There is still some minor problems left, but this was the major part. It woud be absolutely fantastic if JDT LS could provide output from maven plugins (like |
It has been fixed. See eclipse-jdtls/eclipse.jdt.ls#2976
You can try to add
|
Thanks for filing upstream at keycloak/keycloak#24781 also. That was my first impression when I saw the PR for However, it seems like it's an "internal" property ? https://issues.apache.org/jira/browse/MNG-6589 . I guess in that case, it would be convenient for us to just set it. @fbricon , thoughts ? |
my bad it was not merged. |
so yeah just set it |
@rgrunber @fbricon I have updated the PR. It sets the |
Question: I would like to know if vscode-java is compiling multi-module maven project in parallel, using multiple threads?
Is there way to control that?
I have a problem opening maven-based project in vscode. It seems to result in broken build. I suspect the problem might originate from the maven project, which does not compile in parallel due to conflicts between its modules. The errors in language server logs look similar to what I get if I compile the project by using
mvn -T4C clean install
on command line.Environment
Steps To Reproduce
The project I'm working with is Keycloak. Here is an overview of the problem I'm experiencing:
mvn clean install -DskipTests
. I'm able to run the application from the project directory.The situation seems tricky to me: for working with the code, I need vscode. For running the code, I cannot have vscode open.
I'd be grateful for any tips on how to work with a project that does not compile with vscode-java.
The text was updated successfully, but these errors were encountered: