question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

regression: autobuild doesn't watch resources

See original GitHub issue

We 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:closed
  • Created 3 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
snjezacommented, Apr 17, 2021

@rothfels Could you try

"java.format.settings.url": "developers/code-style.xml",
0reactions
rothfelscommented, Apr 17, 2021

@snjeza yes, that also fixes the problem. Thank you! 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

ASP.NET Core Auto build and refresh options doesn't work
[regression] I have the next setting for the following option: Tools > Options > Projects and Solutions > ASP.NET Core > Auto build...
Read more >
Watch A Sphinx Directory & Rebuild The Documentation
Sphinx-autobuild: Watch a Sphinx directory and rebuild the documentation when ... Sphinx does not detect changes in non-document files in incremental mode, ...
Read more >
How to automatically reload .NET Core project in Visual ...
8 Answers 8 · 1) Create.Net core application. · 2) Open a command Window in your Web project's folder · 3) Type dotnet...
Read more >
Two years with Samba's autobuild
Samba does Not Invented Here. Well. ○ Samba's CI system is simple but custom. ○ Python autobuild script. ○ rebases git tree. ○...
Read more >
Automation in Selenium: Page Object Model and Page Factory
It has been modified to include recent sources and to align with our current ... At this point, if auto build is enabled,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found