user200188
user200188

Reputation: 93

Maven not on project's build path in Eclipse Luna

Please, I recently created a "Maven Project" under Eclipse Luna (Ctrl+N > Maven Project), but maven was not found on my project's build path and the Maven folder was not also found in my project. As a result I couldn't use javax.ws.rs.Path. I have tried all the solutions given in this link:How to configure Eclipse build path to use Maven dependencies?

but to no avail. Does anyone has similar issue?

Environment

Eclipse Luna

JRE 1.7

Mac OS 10.9.5

enter image description here

enter image description here

Upvotes: 1

Views: 2449

Answers (1)

A_Di-Matteo
A_Di-Matteo

Reputation: 27812

Firstly, let's be sure Maven is correctly installed in your machine. Basically, check from any command line if everything is correct, simply running: mvn -version

You can firstly try to build your project from command line, getting to the folder containing the project and opening a command line to it.

Once you are from the command line in your maven project, then you can run:

mvn clean install

Then let's also make sure everything is correctly set-up in Eclipse.

  • From Window > Preferences > Maven > Installations, check whether it point to the installation you just verified above
  • I also suggest, once in the Maven Eclipse settings, to go to User Interface > check option "Open XML page in the POM editor by default"

If everything is fine, then make sure to also run right click on the project > Maven > Update projects.. to be sure Eclipse and Maven are in synch concerning dependencies and settings.

If you are still encountering issues, you could then:

  • Right click on the project > Maven > Disable Maven Nature, then right click on the project > Configure > Convert to Maven Project
  • Alternatively, from the command line, run mvn eclipse:eclipse, then refresh the project on Eclipse

Upvotes: 1

Related Questions