Reputation: 260
While running my java project on Eclipse Luna, I have some errors due to which I suppose related to this problem.I right click on the project, choose properties --> java build path --> source, I see a warning at the top:
And it seems that I have forgotten to add this package at the beginning of my project.I want to add it now, but I cannot do it via "Add Folder" button.When I press "Add Folder" button, a window appears like this one:
However, I believe I should add it under "Java Resources" on the tree:
How can I modify this? Thanks for any help..
Upvotes: 7
Views: 31618
Reputation: 21
How to add missing src/test/java folder to the maven project in Eclipse
1) Create a folder test/java under src folder 2) Right click on the project and choose Maven --> Update Project --> choose for Force update of Snapshot/Releases and click ok. Now test folder should appear as src/test/java in Eclipse project explorer
Upvotes: 0
Reputation: 14345
src/test/java
is just maven's default entry for any test classes. If you have (or plan to have) test classes, you can create a new folder structure test/java
below your src
folder and afterwards select it in the dialog you've shown. If you don't plan to have any test classes, you can safely remove the entry from the build path.
Upvotes: 7