AEM Developer Tools for Eclipse aem-developer-tools-for-eclipse

Circular image motif for AEM Developer Tools for Eclipse.

Overview overview

“AEM Developer Tools” is an Eclipse plug-in based on the Eclipse plugin for Apache Sling released under the Apache License 2.

It offers several features that make AEM development easier:

  • Seamless integration with AEM instances through Eclipse Server Connector.
  • Synchronization for both content and OSGI bundles.
  • Debugging support with code hot-swapping capability.
  • Simple Bootstrap of AEM Projects by way of a specific Project Creation Wizard.
  • Easy editing of JCR properties.

Requirements requirements

Before using the AEM Developer Tools, do the following:

  • Download and install Eclipse IDE for Java™ EE Developers. AEM Developer Tools currently support Eclipse Kepler or newer

  • Can be used with AEM version 5.6.1 or newer

  • Configure your eclipse installation to ensure that you have at least 1 GB of heap memory by editing your eclipse.ini configuration file as described in the Eclipse FAQ.

NOTE
On macOS, right-click Eclipse.app, and then select Show Package Contents to find your eclipse.ini.

How to install the AEM Developer Tools for Eclipse how-to-install-the-aem-developer-tools-for-eclipse

Once you have fulfilled the requirements above, you can install the plugin as follows:

  1. Browse the AEM Developer Tools website at https://eclipse.adobe.com/aem/dev-tools/.

  2. Copy the Installation Link.

    Alternatively, you can download an archive instead of using the installation link. Doing so allows offline installation but you miss automatic update notifications.

  3. In Eclipse, open the Help menu.

  4. Click Install New Software.

  5. Click Add….

  6. In Name type AEM Developer Tools.

  7. In Location copy the installation URL.

  8. Click Ok.

  9. Check both AEM and Sling plugins.

  10. Click Next.

  11. Click Next.

  12. Accept the lincese agreements and click Finish.

  13. Click Yes to restart Eclipse.

How To Import Existing Projects how-to-import-existing-projects

The AEM Perspective the-aem-perspective

The AEM Development Tools for Eclipse ships with a Perspective that offers you full control over your AEM Projects and instances.

chlimage_1-2

Sample Multi-Module Project sample-multi-module-project

“AEM Developer Tools” include a sample, multi-module project that helps you quickly get up to speed with a project setup in Eclipse. It also serves as a best-practice guide to several AEM features. Learn more about the Project Archetype.

To create the sample project, complete the following steps:

  1. In the File > New > Project menu, browse to the AEM section and select AEM Sample Multi-Module Project.

    chlimage_1-69

  2. Click Next.

    note note
    NOTE
    This step might take a while because m2eclipse must scan the archetype catalogs.

    chlimage_1-70

  3. Choose com.adobe.granite.archetypes : sample-project-archetype : (highest number) from the menu, then click Next.

    chlimage_1-71

  4. Fill in a Name, Group id, and an Artifact id for the sample project. You can also opt to set some advanced properties.

    chlimage_1-72

  5. Now configure an AEM server to which Eclipse can connect.

    To use the debugger feature, be sure you started AEM in debug mode, which can be achieved by adding the following to the command line:

    code language-none
        -nofork -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=10123
    

    chlimage_1-73

  6. Click Finish. The project structure is created.

    note note
    NOTE
    On a fresh installation (more specifically: when maven dependencies have never been downloaded) you might get the project created with errors. In this case, follow the procedure describe in Resolving Invalid Project Definition.

Troubleshooting troubleshooting

Resolving Invalid Project Definition resolving-invalid-project-definition

To resolve invalid dependencies and project definition proceed as follows:

  1. Select all created projects.
  2. Right-click. In menu Maven, select Update Projects.
  3. Check Force Updates of Snapshot/Releases.
  4. Click OK. Eclipse tries to download the required dependencies.

Enabling tag library autocompletion in JSP files enabling-tag-library-autocompletion-in-jsp-files

Tag library autocompletion works out of the box, given that the proper dependencies are added to the project. There is one known issue when using the AEM Uber Jar, which does not include the needed tld and TagExtraInfo files.

To work around it, ensure that the org.apache.sling.scripting.jsp.taglib artifact is in the classpath before the AEM Uber Jar. For Maven projects, place the following dependency in the pom.xml before the Uber Jar.

<dependency>
  <groupId>org.apache.sling</groupId>
  <artifactId>org.apache.sling.scripting.jsp.taglib</artifactId>
  <scope>provided</scope>
</dependency>

Make sure to add the proper version for your deployment of AEM.

More information more-information

The official Apache Sling IDE tooling for Eclipse website provides you with useful information:

The following official Eclipse documentation can help to set up your environment:

recommendation-more-help
19ffd973-7af2-44d0-84b5-d547b0dffee2