Reputation: 409
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?
Upvotes: 9
Views: 30680
Reputation:
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.
Upvotes: 0
Reputation: 8323
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)
Upvotes: 2
Reputation: 11
I have this quite often. Seems bug in Eclipse. Quit/restart Eclipse seems the easiest to get things working again.
Upvotes: 1
Reputation: 409
I followed the following steps it worked:
Upvotes: 13