dushkin
dushkin

Reputation: 2111

Maven: Fails to detect package in dependency

I have a simple test maven project (on Eclipse Neon) in which I try to link to a class on another jar of mine.

The project structure is displayed on the following image:

enter image description here

Log4jManager is the project of the "3rd party" jar. Log4jEx is the client which tries to use it.

You may see in aaaa.java that the imports point to the correct path of packages in Log4jManager. And yet, they fail to compile.

This is the pom file:

enter image description here

Can you assist please?

Thank you, Tal


UPDATE:

Following a friend suggestion, I installed InteliJ and created the same project. there were no problems here:

enter image description here

So it appears to be an Eclipse issue... :(

Upvotes: 0

Views: 74

Answers (1)

Antoniossss
Antoniossss

Reputation: 32535

Just "clean project" (project menu -> clean) and everything will be fine. Eclipse restart can be helpfull as well. This is typical Eclipse issue that happens to me from time to time.

In general: If your project compiles fine from the console (mvn clean compile) then you can ignore such Eclipse artefacts as they will most likely disapear.

Upvotes: 1

Related Questions