Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA compiler ignores changes on build if project is stored on WSL

I am using IntelliJ IDEA 2023.3.6 and WSL on Windows 11. Everything works properly, except for some weird issues when the compiler ignores the most recent class changes. The project directory \\wsl.localhost\Ubuntu\<path-to-directory> is added as the exclusion for Windows Defender. The only solution I came up with is to perform a Rebuild Project (Ctrl + F9 Build does not work) before every execution of Java application or to execute mvn clean/delete target folder manually. It is very annoying to do it and takes some time whenever I want to rerun the project with some minor changes. Did anyone experience a similar issue?

like image 973
sahzudin Avatar asked Dec 01 '25 16:12

sahzudin


1 Answers

My solution so far (not perfect) was to add a task to run before launch and that task is running, in my case, the compile and test-compile from maven to ensure compilation of changes in classes.

like image 65
Abaddon.Gutierrez Avatar answered Dec 04 '25 00:12

Abaddon.Gutierrez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!