Some time ago I switched from Eclipse 4.7.3 EE-Edition to Eclipse 4.27 Standard-Edition. Since then I have had problems with the properties files. It happens from time to time that when I start a Springboot application, for example, I get the error that the required properties files could not be loaded. When I then look at the target folders, the properties files are missing. Does anyone have any idea what could be the cause? I have a slight suspicion that it could be related to a plug-in that is included in the EE edition and is now missing in the standard edition.
Under Eclipse 4.7.3 EE-Edition I never had the problem. Typically, the problem occurs after the initial checkout, i.e. when Eclipse compiles the code for the first time. However, it can also occur during operation. In other words, I start the application and everything is fine. Then I make a few changes to the code and restart the application and suddenly the problem with the properties files occurs.
The problem can usually be solved by recompiling the code completely (Eclipse menu -> Project -> Clean...) or/and "Maven update" (context menu -> Maven -> Update Project...). Sometimes you have to repeat the steps several times, sometimes one of them is enough.
I am very grateful for any tips/hints, as this behaviour is extremely annoying and time-consuming, Szdnez
In a maven project you can control what resources are included within your build by using the
<resource>tag like this:Note that
src/main/resourcesis the default folder for all your resources, and if you wish to have some resources included in your build and some not, you can leave the default folder out and use another one to be included, for example:Like this, everything you put in src/main/resources/runtime will be included in your build under /classes/ folder, and everything else under src/main/resources will be left out. For more details see maven documentation. You may want to look there at maven filtering as well, it is often used in conjunction with resources.