Reputation: 115
I created a Maven project in Eclipse. Initially my package structure was like
-src/main/java
---com.package1
---com.package2
-src/main/resources
When I build the project successfully and got war deployed in tomcat, My project structure changed to
-src.main.java.com.package1
-src.main.java.com.package2
-src.main.resources
This is generating errors in Java class files in packages import declarations. I want to restore my original project structure. I have m2eclipse plugin installed in Eclipse.
I also tried Maven>Update Project.. (I read somewhere on Stack Overflow that it will restore the original structure) but it is generating the following error
Failed while installing JAX-RS (REST Web Services) 1.1.
org.osgi.service.prefs.BackingStoreException: Resource /Workspace/ProjectName/.settings' does not exist.
Please help how I can restore my project structure back.
Upvotes: 9
Views: 2977
Reputation: 1784
The following helped in my context:
Resource /P/B/.settings not available
After opening P again the error disappears and Project>Maven>Update Project...
works fine.
Upvotes: 4
Reputation: 546
It seems you have created the src/main/java and src/main/resources as normal folder. Just change them to source folder. It will work.
Steps 1.Go to src folder & Right Click 2.New->Others->Source Fokder 3.Then make the folder structure as /main/java & /main/resources 4.Then add the packages.
Upvotes: 1