Working with Maven Project in Eclipse
Maven helps the software project life cycle in many ways. One of the many attributes if it is that it integrates well with IDEs such as eclipse, Net beans and IntelliJ. I am trying to list certain things here which you can do while working with Maven managed project in Eclipse.
1. You definitely need to build your projects correctly in Eclipse and Maven can help you resolving the dependencies correctly so that you project can reference to its repository for building the project. You need to run following two commands:
- Setting a classpath variable for maven repository i.e. M2_REPO, You can run this command from any directory
C:\>mvn -Declipse.workspace="eclipse_workspace_location" eclipse :add-maven-repo
- Setting the project’s .classpath files according to the dependencies specified in pom.xml, You need to run this command at project build folder so that it can check all the dependencies accordingly. In case your pom.xml has child projects it will also set .classpath file for all those as well.
C:\project_build_folder>mvn eclipse:eclipse -o
2. Use m2eclipse plugin for managing for project. Visit m2eclipse.sonatype.org for more details related to installation, features etc.
Most Commented Posts
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments
No comments yet.
Leave a comment