In this article, we will explore about one of the maven command “eclipse:eclipse”
Actually this command is no longer required with latest versions of Eclipse IDE like Kepler, Luna or Mars
If maven is not integrated with Eclipse IDE like in older versions Indigo or Helios, then we can still use maven and bring dependencies into Eclipse
Note: Although, we can integrate maven with Eclipse manually using Marketplace or m2eplugin
1. Scenario:
- Assume we have created java based project outside Eclipse IDE i.e.; using maven archetype from command prompt
- This is just a template, to add actual code we have to import it to eclipse environment [though not necessarily]
- And added couple of spring dependencies to pom.xml
2. To import project into Eclipse IDE:
Step 1: New –> Import –> General –> Existing Project into Workspace
Step 2: Browse through the project that we have created using maven archetype
Step 3: Upon importing into Eclipse workspace –> dependencies aren’t imported with project
Run “mvn eclipse:eclipse” command –> to update with dependencies
Final project with dependencies
3. Useful Eclipse IDE shortcuts :
- Eclipse IDE – How to show line numbers ?
- Eclipse IDE – How to GO TO any line number directly ?
- Eclipse IDE – How to remove unused imports ?
- Eclipse IDE – How to clean project ?
- Eclipse IDE – How to build Java project automatically ?
- Eclipse IDE – How to comment and un-comment line & block ?
- Eclipse IDE – How to generate constructor using fields ?
- Eclipse IDE – How to generate getters and setters ?
- Eclipse IDE – How to search files ?
- Eclipse IDE – How to locate methods in Java file ?
- Eclipse IDE – How to open editor using CTRL + E ?
- Eclipse IDE – Java compiler compliance level issue
Related Articles:
- Eclipse + Maven – Integration
- Eclipse + Maven – How to import Maven project with pom.xml ?
- Eclipse + Maven – Setting M2_REPO classpath variable in IDE
- Eclipse + Maven – M2_REPO is Non Modifiable
- Eclipse + Maven – Creating and exploring projects using archetypes
- Eclipse + Maven – Converting Web project to Maven project
- Eclipse + Maven – mvn eclipse:eclipse command
- Eclipse + Maven – Plugin execution not covered by lifecycle configuration
- Apache Maven – Introduction
- Apache Maven – Install on Windows 7 OS
- Apache Maven – Settings.xml explanation
- Apache Maven – Proxy setting explanation
- Apache Maven – pom.xml explanation
- Apache Maven – Plugins explanation
- Apache Maven – Changing default Maven repository location in Windows 7 OS
- Apache Maven – Local, Central and Remote Repositories
- Apache Maven – Installing custom library into local repository
- Apache Maven – Transitive dependencies explanation
- Apache Maven – Exclusion of Transitive dependencies
- Apache Maven – Dependency Scopes
- Apache Maven – Skipping unit test using surefire plugin
- Apache Maven – Exclusions and Inclusions of unit test
- Apache Maven – offline execution
- Apache Maven – Co-ordinates explained
References:
- http://maven.apache.org/guides/mini/guide-ide-eclipse.html#Simple_Project
- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html
Happy Coding !!
Happy Learning !!