In this article, we will integrate Apache Maven a popular build tool with Eclipse IDE
This is only required for the “Juno (3.8/4.2)” version or lower versions like Indigo (3.7), Helios (3.6), etc
With versions starting from Kepler (4.3) and higher versions like Luna (4.4) or Mars (4.5) –> don’t require these steps to be followed as Maven comes built-in with these versions
Note: Current stable release is Luna (4.4) and this is available for all platforms like Windows, Linux, Mac OS X, and Solaris
Lets walk through step-by-step for integrating maven with Eclipse IDE (Juno version) in Windows environment
1. Eclipse IDE + Maven – Integration :
There are two ways
- Eclipse Marketplace…
- Install New Software…
1.1 Eclipse Marketplace…
Step 1: Open Eclipse IDE (Juno version)
Step 2: Eclipse –> Help menu –> Eclipse Marketplace…
Step 3: Click Eclipse Marketplace…
Step 4: Type “m2eclipse” in Find box and hit enter –> it will pull all matching plugins from eclipse marketplace
Step 5: Install “Maven Integration for Eclipse WTP (Juno)”
Step 6: Check “plugins” to be installed –> click Next
Note: It’s better to check all boxes and install at once
Step 7: Select “I accept the terms of the license agreements” –> click Finish
Step 8: Installation in progress
Step 9: After installing required plugins –> eclipse will prompt to restart IDE again to take effects of new changes
Click “Yes” to restart the Eclipse IDE
Step 10: To verify whether Maven successfully installed in the Eclipse IDE (Juno version)
Go to Eclipse –> Windows –> Preferences
Step 11: If “Maven” listed on the left hand side –> then Maven installed successfully
Step 12: To create Maven based project from wizard
Go to Eclipse –> File –> New –> Others –> type “Maven”
That’s all for the Way one, now let’s move on to Way-2
1.2 Install New Software…
Step 1: Open Eclipse IDE (Juno version)
Step 2: Eclipse –> Help menu –> Install New Software…
Step 3: Install New Software wizard
Step 4: Enter the link “http://download.eclipse.org/technology/m2e/releases” into Work with –> hit enter
Check “Maven Integration for Eclipse” –> Click Next
Step 5: View the installation details –> Click Next
Step 6: I accept for the license –> Click Next
Step 7: Restart Eclipse IDE to take effects of new changes
That’s all with our Way-2
2. Conclusion:
- We have liberty of walking either way for installing Maven to Eclipse IDE
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:
Happy Coding !!
Happy Learning !!