regression: autobuild doesn't watch resources
See original GitHub issueWe have a .classpath like this:
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
...
Until recently, the Java language server would automatically update target/classes whenever files in src/main/resources would change. This was useful; we run a watch process in development to compile TS -> JS and output the generated code in src/main/resources.
Now, it seems only Java sources (in src/main/java) are being watched. The autobuild setting correctly generates new bytecode whenever .java files change. But it does not copy over resources that are updated.
We can work around this by putting our compiled resources directly in target/classes, but it seems like the language server should follow the classpath directives and do this automatically for us (as it used to). Instead, we now have to Java: Force Java Compilation (Full) to get the language server to copy over the resources whenever they change.
Environment
- Operating System:
MacOS 11.2.1 - JDK version:
openjdk 15.0.1 2020-10-20 - Visual Studio Code version:
1.54.3 - Java extension version:
0.76.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (4 by maintainers)

Top Related StackOverflow Question
@rothfels Could you try
@snjeza yes, that also fixes the problem. Thank you! 🎉