You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Java plugin rebuilds project code everytime i instruct maven to compile #4100
What happens if you add the setting "java.autobuild.enabled": false ? Does that solve the build issues ? It might be that your Maven build makes certain modifications that cause the Java support to detect certain changes that then trigger the autobuild. With this setting you would have to manually trigger the rebuild but may be worth it if it solves the conflict.
What happens if you add the setting "java.autobuild.enabled": false ? Does that solve the build issues ? It might be that your Maven build makes certain modifications that cause the Java support to detect certain changes that then trigger the autobuild. With this setting you would have to manually trigger the rebuild but may be worth it if it solves the conflict.
@rgrunber, that's a good mitigation, thanks. However, I won't be able to access the "problems" tab, or other functional features, that it seems it requires the java plugin...
Returning to my original point: resolve the issue with Maven-Java not functioning correctly.
What do you mean by accessing the problems tab ? Even if you disabled auto-build, you can still manually call Java: Rebuild Projects or Java: Force Java Compilation to have the problems view populated with issues. Is that what you meant ?
What do you mean by accessing the problems tab ? Even if you disabled auto-build, you can still manually call Java: Rebuild Projects or Java: Force Java Compilation to have the problems view populated with issues. Is that what you meant ?
If i turn "java.autobuild.enabled": false and build the project using maven (manually select it), the problems view is not populated with results
Would you be able to share the project ? Even if you could only share the project without the sources, and could mention the kind of problems that don't get reflected in the problems view, would help.
Would you be able to share the project ? Even if you could only share the project without the sources, and could mention the kind of problems that don't get reflected in the problems view, would help.
@rgrunber thanks for following up... I have open a separate topic about that specific issue: #4117
If this particular issue now remains about a conflict between the Java VS Code extension and the calling of a build tool from commandline (or some other way), then this seems very similar to redhat-developer/vscode-quarkus#999 . That one was about using the Quarkus tooling & Java extension ,but the idea is the same. Running a build command (even within the terminal of VS Code) while the Java extension is set to autobuild can cause conflicts.
If this particular issue now remains about a conflict between the Java VS Code extension and the calling of a build tool from commandline (or some other way), then this seems very similar to redhat-developer/vscode-quarkus#999 . That one was about using the Quarkus tooling & Java extension ,but the idea is the same. Running a build command (even within the terminal of VS Code) while the Java extension is set to autobuild can cause conflicts.
@rgrunber the case here in #4117 is not related to autbuild since I disabled it following your initial suggestion ("java.autobuild.enabled": false ! Thanks for the tip!
The question is also not related to running a specific command line tool... as you can see in #4117 i trigger the build using maven, and I expect the JAVA results are properly updated ("java.import.maven.enabled": true)
Last time I try to exclude in watch and it works can you try @palminha
"files.watcherExclude": {
"/node_modules/": true,
"/target/": true,
"/build/": true,
"/.git/": true,
"/.idea/": true
},
I also face this problem now. It was working fine for months. But now maven and and this Java-Plugin fighting against each other. I'm aware, that maven builds in a (VS-Code-) terminal can couse conflicts. That's why I start my Maven builds through the Maven for Java plugin. I thought, that this stops autobuilds while maven is running? As I said, this was working fine for months.
@maroony , what version of vscode-java are you running ? Is it the pre-release version ? Nothing has been released since the end of July. Running the build through the "Maven for Java" plugin is just a convenient way to run it the same way that would be done in terminal/commandline.
I have the same issue.
As @maroony said, it wasn't a problème a few weeks / months ago. From my perspective, it was "breaking not down", meaning that we were lucky that it was working properly.
Right now, when launching a build with vscode-maven, then vscode-java starts to rebuild immediatly in the same time, and the Maven build fails most of the time because of that. Sometimes, even mvn clean fails, unable to delete target/ content properly...
So, to be able to work in good conditions, I keep a settings tab, opened all the time, focused on "java.autobuild", so I activate while developing (to keep the IDE up to date) and I disable it when I need to build with Maven (ex : running tests with Cucumber and / or JaCoCo, or a mvn -U clean compile to get the latest versions of my dependencies).
Like @palminha said, here or in another issue, all modern Java projects build with Maven / Gradle. So I'm wondering how is this possible that both vscode-java and vscode-maven teams didn't have any communication about the building process to coordinate their work in order to have a flawless integration of each other's build process.
I use : VSCode 1.105.1 / vscode-java 1.46.0 / vscode-maven 0.44.0
I have the same issue. As @maroony said, it wasn't a problème a few weeks / months ago. From my perspective, it was "breaking not down", meaning that we were lucky that it was working properly.
Right now, when launching a build with vscode-maven, then vscode-java starts to rebuild immediatly in the same time, and the Maven build fails most of the time because of that. Sometimes, even mvn clean fails, unable to delete target/ content properly... So, to be able to work in good conditions, I keep a settings tab, opened all the time, focused on "java.autobuild", so I activate while developing (to keep the IDE up to date) and I disable it when I need to build with Maven (ex : running tests with Cucumber and / or JaCoCo, or a mvn -U clean compile to get the latest versions of my dependencies).
@maroony i disable the java build with "java.autobuild.enabled": false and i'm now only using maven and waiting for this issue to be released: microsoft/vscode-maven#1098
Hi, is there a way this would be resolved somehow, please? It still happens. It is a blocker for me to use VS Code properly with Java.
@baldimir i turned it off with java.autobuild.enabled": false.
If you install "maven for Java" plugin version 0.45.0, then all the build messages from maven will be reflected in the problems tab (don't upgrade the plugin)
Activity
rgrunber commentedon Jul 4, 2025
What happens if you add the setting
"java.autobuild.enabled": false? Does that solve the build issues ? It might be that your Maven build makes certain modifications that cause the Java support to detect certain changes that then trigger the autobuild. With this setting you would have to manually trigger the rebuild but may be worth it if it solves the conflict.palminha commentedon Jul 5, 2025
@rgrunber, that's a good mitigation, thanks. However, I won't be able to access the "problems" tab, or other functional features, that it seems it requires the java plugin...
Returning to my original point: resolve the issue with Maven-Java not functioning correctly.
palminha commentedon Jul 5, 2025
"java.autobuild.enabled": falsedoesn't block the code to be built by java plugin when i open vscodergrunber commentedon Jul 7, 2025
What do you mean by accessing the problems tab ? Even if you disabled auto-build, you can still manually call
Java: Rebuild ProjectsorJava: Force Java Compilationto have the problems view populated with issues. Is that what you meant ?palminha commentedon Jul 8, 2025
If i turn
"java.autobuild.enabled": falseand build the project using maven (manually select it), the problems view is not populated with resultsrgrunber commentedon Jul 15, 2025
Would you be able to share the project ? Even if you could only share the project without the sources, and could mention the kind of problems that don't get reflected in the problems view, would help.
palminha commentedon Jul 16, 2025
@rgrunber thanks for following up... I have open a separate topic about that specific issue: #4117
rgrunber commentedon Jul 16, 2025
If this particular issue now remains about a conflict between the Java VS Code extension and the calling of a build tool from commandline (or some other way), then this seems very similar to redhat-developer/vscode-quarkus#999 . That one was about using the Quarkus tooling & Java extension ,but the idea is the same. Running a build command (even within the terminal of VS Code) while the Java extension is set to autobuild can cause conflicts.
palminha commentedon Jul 16, 2025
@rgrunber the case here in #4117 is not related to autbuild since I disabled it following your initial suggestion (
"java.autobuild.enabled": false! Thanks for the tip!The question is also not related to running a specific command line tool... as you can see in #4117 i trigger the build using maven, and I expect the JAVA results are properly updated (
"java.import.maven.enabled": true)tinhtran19 commentedon Aug 6, 2025
Last time I try to exclude in watch and it works can you try @palminha
"files.watcherExclude": {
"/node_modules/": true,
"/target/": true,
"/build/": true,
"/.git/": true,
"/.idea/": true
},
maroony commentedon Aug 29, 2025
I also face this problem now. It was working fine for months. But now maven and and this Java-Plugin fighting against each other. I'm aware, that maven builds in a (VS-Code-) terminal can couse conflicts. That's why I start my Maven builds through the Maven for Java plugin. I thought, that this stops autobuilds while maven is running? As I said, this was working fine for months.
rgrunber commentedon Aug 29, 2025
@maroony , what version of vscode-java are you running ? Is it the pre-release version ? Nothing has been released since the end of July. Running the build through the "Maven for Java" plugin is just a convenient way to run it the same way that would be done in terminal/commandline.
maroony commentedon Aug 29, 2025
@rgrunber VSCode 1.103.2, Maven for Java 0.44.0, Language support for Java 1.44.0.
Maze-fr commentedon Oct 20, 2025
I have the same issue.
As @maroony said, it wasn't a problème a few weeks / months ago. From my perspective, it was "breaking not down", meaning that we were lucky that it was working properly.
Right now, when launching a build with
vscode-maven, thenvscode-javastarts to rebuild immediatly in the same time, and the Maven build fails most of the time because of that. Sometimes, evenmvn cleanfails, unable to deletetarget/content properly...So, to be able to work in good conditions, I keep a settings tab, opened all the time, focused on "java.autobuild", so I activate while developing (to keep the IDE up to date) and I disable it when I need to build with Maven (ex : running tests with Cucumber and / or JaCoCo, or a
mvn -U clean compileto get the latest versions of my dependencies).Like @palminha said, here or in another issue, all modern Java projects build with Maven / Gradle. So I'm wondering how is this possible that both vscode-java and vscode-maven teams didn't have any communication about the building process to coordinate their work in order to have a flawless integration of each other's build process.
I use : VSCode 1.105.1 / vscode-java 1.46.0 / vscode-maven 0.44.0
palminha commentedon Oct 21, 2025
@maroony i disable the java build with
"java.autobuild.enabled": falseand i'm now only using maven and waiting for this issue to be released: microsoft/vscode-maven#1098baldimir commentedon Feb 2, 2026
Hi, is there a way this would be resolved somehow, please? It still happens. It is a blocker for me to use VS Code properly with Java.
palminha commentedon Feb 2, 2026
@baldimir i turned it off with
java.autobuild.enabled": false.If you install "maven for Java" plugin version 0.45.0, then all the build messages from maven will be reflected in the problems tab (don't upgrade the plugin)