Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Why are .html files not copied to target directory?
Why are .html files not copied to target directory? [message #1803326] Tue, 26 February 2019 21:40
Michael Moser is currently offline Michael MoserFriend
Messages: 64
Registered: October 2012
Location: Zürich, Switzerland
Member
I was programming along on a webservice using SpringBoot and the thymeleaf library when I ran into an issue, that my webservice kept claiming that it could not find a specific .html file that it was supposed to serve. It's supposed to be in a folder that sits underneath the resources folder in the source tree.

After quite a while of debugging I suddenly had to learn that for some odd reason html files that are located under src/main/resources are NOT copied over to the bin/main folder!?! :-o

Why is that so???

I have a plain vanilla gradle project setup, i.e. something like:
* src
+-* main
| +-* java 
| | +-* com
| | | +-* foo
| | | | +-+ bar
| | ...
| +-+ resources 
| | +-+ static
| | | ... HTML and other files here...
| | +-+ templates
| | | ... HTML and other files here... 


For some odd and - at least for me - non-understandable reason all kinds of files underneath src/main/resources/static and src/main/resources/templates are faithfully copied over to the bin/main target directory, but *.html files are NOT.

Why is that so? The corresponding snippet in the classpath file does NOT contain any filter or such! So, why are only html files ignored and not copied over?

   ...
	<classpathentry kind="src" path="src/main/resources">
		<attributes>
			<attribute name="gradle_scope" value="main"/>
			<attribute name="gradle_used_by_scope" value="main,test"/>
		</attributes>
	</classpathentry>
   ...
	<classpathentry kind="output" path="bin/main"/>
   ...


Where and how can one adjust/correct this strange behaviour?

This is on Windows 10 Pro using Eclipse 2018-12.

[Updated on: Tue, 26 February 2019 22:11]

Report message to a moderator

Previous Topic:How to install J2EE plugin into Eclipse Luna SE
Next Topic:How to configure Eclipse to use OpenJDK instead of "normal" Oracle JDK?
Goto Forum:
  


Current Time: Thu Apr 25 02:10:27 GMT 2024

Powered by FUDForum. Page generated in 0.02772 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top