Posts

Showing posts with the label maven

Using maven with eclipse

As i first started using maven for my projects, I used to add the maven plugin to eclipse. The plugin makes you able to mark a project as "maven enabled". This adds the library maven dependencies to the classpath of the project so the dependency libraries can be visible to your classes. As i moved further, I found a better way dealing with maven projects using eclipse; maven eclipse:clean and eclipse:eclipse goals. the goals enables you to make all the configuration and settings through command line which is more powerful and stable. Actually i now never created a new project inside eclipse. It is better to created it outside using maven. Then through eclipse:eclipse u create eclipse project settings files that is ready to be imported to any running eclipse instance. M2_REPO variable that points to the local maven repository. The pretty thing is that you can add that variable to an eclipse workspace through mvn -Declipse.workspace={workspace-path} eclipse:add-maven-re...