How to build AEM project in Eclipse using AEM Archetype
To build an AEM structured project in eclipse please follow the following steps.
Step 1: Configure the AEM Archetype in Eclipse. Before we begin our development, we need to first configure the AEM Archetype so that we can use it for building AEM related Maven Projects in Eclipse.
1. Open Eclipse.
2. Go to Window --> Preferences
3. From the left side window, expand the Maven option.
4. Click on Archetypes.
5. Click on Add Remote Catalog.
6. In the Catalog File, text box enter the URL: https://repo.adobe.com/nexus/content/groups/public/archetype-catalog.xml
7. In the Description text box enter "AEM".
6. In the Catalog File, text box enter the URL: https://repo.adobe.com/nexus/content/groups/public/archetype-catalog.xml
7. In the Description text box enter "AEM".
8. Click OK. Click Apply. Click OK.
Step 2: Creating a new AEM Maven project now that we have configured the AEM Archetype, we need to proceed to create an AEM project in Eclipse.
Let's proceed:
1. In Eclipse go to File--> New --> Other
2. Browse and Select Maven --> Maven Project --> Next.
3. Click Next again.
Step 2: Creating a new AEM Maven project now that we have configured the AEM Archetype, we need to proceed to create an AEM project in Eclipse.
Let's proceed:
1. In Eclipse go to File--> New --> Other
2. Browse and Select Maven --> Maven Project --> Next.
3. Click Next again.
4. Choose the "AEM" Archetype from the Catalog dropdown.
5. Choose the "aem-project-archetype" from the list of options.
6. Click Next. It will download some required artifacts.
7. Now enter the required details as shown below.
8. Now click Finish.
9. You will now have a project Structure like this.
7. Now enter the required details as shown below.
8. Now click Finish.
9. You will now have a project Structure like this.
10. Please DO NOT worry if you see red marked errors in the project. After a build, it will disappear.
Step 3: Building the AEM Maven ProjectNow after we have created the basic project structure we need to build our project.
1. Right-click on the parent project "newProject".
2. Go to Run As. Click the second option 2 Maven Build.
3. Type in a clean install in the Goals text box.
NOTE: If you are using any External API Jars then please add the dependencies in your pom.xml before building. Else the build will fail.
4. It will start the build and download many resources.
Step 3: Building the AEM Maven ProjectNow after we have created the basic project structure we need to build our project.
1. Right-click on the parent project "newProject".
2. Go to Run As. Click the second option 2 Maven Build.
3. Type in a clean install in the Goals text box.
NOTE: If you are using any External API Jars then please add the dependencies in your pom.xml before building. Else the build will fail.
4. It will start the build and download many resources.
5. Downloading may take upto 30 Minutes. So please be patient.
6. After the Build, we will see how we can use our project to build AEM Applications.
6. After the Build, we will see how we can use our project to build AEM Applications.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.