March 19, 2020
Estimated Post Reading Time ~

Maven integration with Eclipse

Maven is a popular tool that is being used by most of the developers for building and deploying the projects. I am dedicating this post towards the configuration of maven with eclipse and AEM. The basic assumption here is you have a running AEM instance on your machine.
Let’s start,
Setting up Maven on your Machine
· Download Maven from here in the binary version
· Extract the zip file in the destination folder of your choice, extracted folder which contains bin, boot, conf, lib subfolders

· Next we must set the environment variables
o Right-click on ‘My Computer’ and select ‘Properties’.
o Click the Advanced system settings link
o Click Environment Variables. In the section User variables, create new variable M2_HOME
o Set M2_HOME path as shown below [I have extracted maven in C:/ directory]

o Then, add the path of bin folder in Path variable, as shown below
o Close all remaining windows by clicking OK

· Now let’s verify maven configurations using command prompt



Congratulations, you have configured the maven correctly in your system.
How to Configure maven with Eclipse
· Download Eclipse from Official website by clicking here
· Unzip the downloaded file and start the eclipse [No need of installation] by running an eclipse.exe file from the extracted folder.
· The workspace setup Dialog will open, select the path of desired workspace location convenient to you and click ‘OK’

· Eclipse will open, now close the welcome screen and click on help > Install New Software.. As shown

· Please select ‘All Available Sites‘ from dropdown in the field labelled “Work with”. Use the search to find and select maven plugins : m2e – Maven Integration for Eclipse. If the repository is missing with our eclipse installation then we will get no results for our search

· To get the results for search we will have to add mentioned url [http://download.eclipse.org/technology/m2e/releases] manually in the ‘work with’ dropdown

· Select both plugins and click on next, click next again and accept terms and conditions and finish the process.
· After successful installation of plugins, eclipse will pop up a “restart required” request, allow eclipse to restart in order to complete the plugin installation.
Test the installations and configurations
· Import existing/downloaded AEM project from file system into eclipse






Click on Finish.
You will be able to see the installation progress on “console”

Congratulations, you have configured Maven with Eclipse successfully.



By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.