1

I am having problems using Eclipse IDE features. When trying to find all references to a method within a project (by right clicking a method and choosing References -> Project) I get the error "The resource is not on the build path of a Java project".

Screenshot of main problem

Additionally, I have another (probably related) error described here Eclipse Open declaration in Java project. I think these issues have to do with the way I imported the project or a lack of some software/plugin in Eclipse. I imported the project using File -> Import -> Existing Maven Projects after I git cloned the repository from Github.

Some of the things I have found on the internet about how to fix this problem involves modifying the Build Path or Facets properties of the project but I don't have either of these options:

Screenshot of properties window

What needs to be done to allow reference searching and other IDE features?

Community
  • 1
  • 1
Michael Fulton
  • 4,608
  • 3
  • 25
  • 41

2 Answers2

0

You need to convert your Eclipse project to Maven Project:
1) Right click on the project,
2) Configure,
3) Convert to Maven Project
==> This will re-organize your project to a common Maven project structure.

andrejt
  • 21
  • 3
0

For this same error, I had built the project on the command line with 'mvn clean install -U', but I don't think eclipse can 'see' that. Doing a maven->update Project fixed alot of that.

mojo-jojo
  • 145
  • 1
  • 1
  • 7