简体   繁体   中英

How to add dependency in maven so Eclipse can use it on the buildpath

Very often I get this error in Eclipse, saying that some classes are not present on the build path.

For eg, now it can not find the class "cucumber.api.java.After". This class do exist in the jar "cucumber-java-1.2.5.jar" And if you take a look at the pom.xml in the image below you see that that dependency is included in the project.

But why does not my beloved Eclipse find it? Best regards Fredrik

在此处输入图片说明

I feel a bit silly now. But a Refresh of all projects and a Maven > Update Project with "Force update ..." actually solved the problem. Must try to remember that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM