Monday, October 19, 2020

Configure AEM Plugin for Eclipse

 

Configure AEM Plugin for Eclipse


Installing AEM Plugin in Eclipse and use AEM server to sync code between AEM Instance and Eclipse.

 

The main advantage of using this plugin over traditional Maven arch type project is:-

  • ·         Its easy integration with eclipse.
  • ·         Synchronization of both content and OSGI bundles.
  • ·         Debugging support for swapping of code means no need to re build every time.
  • ·         Easy access to JCR properties.

 

STEP 1: Start AEM in Debug Mode

 

Go to your AEM Installed directory for example F:\AEM\AEM-Author\crx-quickstart\bin

Copy start.bat file and paste it at root folder I.e. F:\AEM\AEM-Author

Now open and edit that file and enter the below lines into it.

java -Xmx2048M -XX:MaxPermSize=256M -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=30303 -jar aem6.3-author-p4502.jar –nofork

Here, aem6.3-author-p4502.jar is the name of your AEM jar file.

Now double click this file (start.bat) to start your AEM in debug mode.

     

STEP 2: Install AEM Plugin for Eclipse

 

Open eclipse –> Go to help –> install new software


Step 2.1



Click Add and Enter

NAME: AEM developer tools plugin

LOCATION: https://eclipse.adobe.com/aem/dev-tools/


Step 2.2



Select both AEM and Sling Plugin and Click Next.

Click Next Accept the license agreement Click Finish.

Once installation completes it will prompt for restarting eclipse. Restart Eclipse.

Note: - Warning pop up may occur as it is an unsigned software click OK on it.


STEP 3: change the current Perspective to AEM Perspective

Go to Windows–> Perspective –> Open Perspective –> Other –> Select AEM

 


Step 4: Create AEM Multi Module Project

Go to File–> New –> Other –> Search for AEM and Select AEM Sample Multi-Module Project –> Click Next

Choose project location and archetype. Select archetype 10 or 11 from drop down and click next.


 

Configure Archetype Properties

Name: aemsample

Group Id: com.aemsample

Artifact Id: aemsample

Click on advance tab and enter values for version Package and other parameters.

Click Finish.

You can see a new project will be created under Project Explorer.

This is very helpful as we get the sample project directed created under eclipse with all dependencies resolved.

 

Step 5: Creating server

Create New server and Enter below details

Debug Port should be same as we configured in start.bat file i.e. 30303

 


Click Finish and now you can easily debug your AEM Code.

 

 

No comments:

Post a Comment