Search code examples
spring-booteclipsemavenspring-tool-suiteapplication.properties

Eclipse IDE for Enterprise Java (Maven) keeps dropping application.properties file


As I'm working on a project, with automatic reloads on save on, sometimes Eclipse will just stop loading the application.properties file for whatever Maven project I'm working on. Usually this happens generally the same time the automatic reloads stop upon making changes to the application.properties file. The biggest headache is getting Eclipse to start picking up the file again, as cleaning the project, closing/opening the editor, making random meaningless code changes here and there, all don't work. I have to do something random like unconfigure a massive portion of my project or delete a big chunk of the pom.xml and try to run the project again (if it works). I'm just spending a significant amount of time trying to get Eclipse to stop behaving so erratically on a regular basis. Thanks for you help!

  • Closing/Opening editor
  • Cleaning/Rebuilding project
  • Making meaningless code and configuration changes, and trying to compile
  • Forcing the project to completely choke and then fixing the introduced errors

Solution

  • The solution I found to my unique case is in the comment posted by Martin Lippert in the comments on this page. the issue was that Eclipse was randomly deciding to stop using things in the src/main/resources folder. This was fixed using Right Click => Run As => Maven Install on my application