Reputation: 131
Why when I import a git project it does not appear like full package path view (main.java.comformance) like this image:
I have imported this project before but now in the package view, it only appears as a tree of folders and not full package path view like main.java.comformance with package icons. I wonder what I'm doing differently now. I followed the instructions in this video: https://www.youtube.com/watch?v=L8IeaWHZCRo)?
Upvotes: 0
Views: 2011
Reputation: 34135
Both projects on the screenshot do not seem to be configured correctly (probably because they were not created with Eclipse or files like .project
were not shared):
pom.xml
file): the Java source folder should be src/main/java/
(default of Maven) instead of src
(default of Eclipse) and the Java packages for instance uk.ac.manchester.cs.jfact
instead of main.java.uk.ac.manchester.cs.jfact
.The simplest way is to use the Eclipse Smart Import feature (instead of configure everything manually): the Java nature of the project will be detected even without the .project
file and also the pom.xml
file is read to get the required JARs and to configure the Java build path and source folder(s) automatically:
Upvotes: 2
Reputation: 1885
Do you see the "J" in the icon next to the project name "jfact" at the right image? That means that it is a "java" project. Eclipse does not know anything about your project.
You will have to do one of this:
mvn eclipse:eclipse
to convert/create the project files for eclipse, and open again the project.After you manage it to become a Java project, furter steps could be needed, but maybe will be enough.
Upvotes: 0