The resource is not on the build path of a java project?
Asked Answered
C

4

9

I have a Maven project on my Eclipse. When I perform call hierarchy I get the message:

The resource is not on the build path of a java project.

What needs to be configured for this?

Creatine answered 5/8, 2013 at 12:23 Comment(2)
What are you doing call hierarchy on?Piecrust
Is the class that contains the method in the build path of the Maven java project?Piecrust
C
13

I followed the following steps it worked:

  1. Properties->project facets->check java->ok
  2. convert to maven project.
Creatine answered 6/8, 2013 at 6:51 Comment(3)
I had to do something similar to the above. 1. Right-click on the maven project 2. Click on Properties > Project Facets 3. Click on "convert to faceted form" 4. Ensure that Java was checked in the "Project Facet" column and then click ApplyAdabelle
I do not have "Project Facets" available as an option.Peirce
My Hero! Damn lack of source has been killing me on this project and I didnt have time to fix it, your answer fixed it thanks!Fritzsche
R
2

Assuming you're expecting a call hierarchy in your own code, ensure that all sources are located in the src/main/java directory.

Have you installed the Eclipse m2e plugin? Does your Eclipse recognize the project as a Maven project? (right click > maven > convert to maven project)

Restrictive answered 5/8, 2013 at 12:48 Comment(2)
and the project builds ?Restrictive
well, this should be the 1st thing to solve. You should open a new question for it. Does it build using maven only (using mvn clean install command ?)Restrictive
U
1

I have this quite often. Seems bug in Eclipse. Quit/restart Eclipse seems the easiest to get things working again.

Undertrump answered 29/1, 2020 at 9:41 Comment(0)
C
0

Since you are working on a Maven project, every resource must be included in a pom.xml file. If not, the external file must be included as a jar file. Also, if you are not able to open the call hierarchy, the project which is being referred must be open in your Eclipse workspace.

Conjuncture answered 5/8, 2013 at 12:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.