Eclipse - Maven project dependencies not in classpath

While configuring a new maven project one may face problem "Maven project dependencies, not in classpath". There are some steps one need to take care while configuring maven project in their workspace. This error is related to workspaces abiding by JAVA 1.4, so it will be very rare that somebody finds this issue.

1. Check out the project from the repository like svn, cvs, git etc.
2. Right click on project and go to Configure > Convert to Maven Project
3. If the project is still not initialized, right-click on the project and go to project properties and go to Project Facets.
4. Apply the facets as per project, don't forget to click on Java facet.
5. Make sure that version is 1.5+ for Java. By default, many eclipse flavours take it default as Java 1.4. This causes Maven dependencies not to move in application classpath, and hence many libraries will be missing, and your project will keep throwing the compilation error.


6. If still project is not showing maven dependencies in class path, again right on project and go to Maven > Update Project.

This should resolve your problem, my oversight was that i had not changed the version of Java in the Project Facet.

Comments

Popular posts from this blog

Caused by: java.sql.SQLTimeoutException: ORA-01013: user requested cancel of current operation

HashiCorp Vault Integration with Ansible Etower using approle

utility to extract date from text with java