Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build path entry is missing: /src/test/java

Tags:

java

eclipse

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:

enter image description here

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:

enter image description here

However, I believe I should add it under "Java Resources" on the tree:

enter image description here

How can I modify this? Thanks for any help..

like image 975
oddly Avatar asked Apr 23 '15 11:04

oddly


2 Answers

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.

like image 192
Marvin Avatar answered Sep 18 '22 12:09

Marvin


This worked for me:

mvn clean install
like image 31
Diego Santa Cruz Mendezú Avatar answered Sep 20 '22 12:09

Diego Santa Cruz Mendezú