1

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

Community
  • 1
  • 1
user200188
  • 93
  • 1
  • 9
  • Is your Eclipse > Windows > Preferences > Maven > Installations correctly configured? I hope you also have a JDK installed and not only the JRE :) – A_Di-Matteo Dec 03 '15 at 22:06
  • Yeah. it is configured :) – user200188 Dec 03 '15 at 22:30
  • What do you mean by "the Maven folder was not also found in my project", can you post a picture of the created Maven project or provide further details about the error you are getting? – A_Di-Matteo Dec 03 '15 at 22:32
  • @A.DiMatteo from the images added, you can see Maven folder is not shown on the project as the Apache Tomcat and JRE System Library. Thanks – user200188 Dec 04 '15 at 07:11

1 Answers1

1

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
A_Di-Matteo
  • 26,902
  • 7
  • 94
  • 128
  • 1
    Oh man. I now know the reason because or your instructions. i followed your instructions and realized, for the first time, that Maven is not even installed anymore on my machine. I guess during an OS update, it was taken out or something. Afew digging on google revealed that Maven is not installed any more by default on Mac OS X 10.9. So, I had to install it myself using brew install maven. Thanks man. – user200188 Dec 04 '15 at 22:23