AEM Developer Tools for Eclipse

You are reading the AEM 6.3 version of AEM Developer Tools for Eclipse.
This documentation is also available for the following versions: 
file

Overview

The AEM Developer Tools for Eclipse is a Eclipse plugin 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-swaping capabiliby.
  • Simple bootstrap of AEM projects via a specific Project Creation Wizard.
  • Easy JCR properties edition.

Requirements

Before using the AEM Developper Tools, you need to:

  • Download and install Eclipse IDE for Java EE Developers. We currently support Eclipse Kepler or newer
  • We support AEM version 5.6.1 or newer
  • Configure your eclipse installation to ensure that you have at least 1 Giga bytes of Heap memory by editing your eclipse.ini configuration file as described in the Eclipse FAQ.

Note

On Mac OS X, you need to right click on Eclipse.app and then select Show Package Contents in order to find your eclipse.ini.

How to install the AEM Developer Tools for Eclipse

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

  1. Copy the Installation Link.

    Note that alternatively you can download an archive instead of using the installation link. This allows offline installation but you will miss automatic update notifications this way.

  2. In Eclipse, open the Help menu.

  3. Click Install New Software.

  4. Click Add....

  5. In Name type AEM Developer Tools.

  6. In Location copy the installation URL.

  7. Click Ok.

  8. Check both AEM and Sling plugins.

  9. Click Next.

  10. Click Next.

  11. Accept the lincese agreements and click Finish.

  12. Click Yes in order to restart Eclipse.

How To Import Existing Projects

The AEM Perspective

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

file

Sample Multi-Module Project

The AEM Developer Tools for Eclipse comes with a sample, multi-module project that helps you quickly get up to speed with a project setup in Eclipse, as well as serving as a best-practice guide to several AEM features. Learn more about the Project Archetype.

Follow these steps to create the sample project:

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

    file
  2. Click Next.

    Note

    This step might take a while since m2eclipse needs to scan the archetype catalogs.

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

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

    file
  5. You should then configure an AEM server to which Eclipse will connect.

    In order to use the debugger featue, you need to have started AEM in debug mode - which can be achieved eg by adding the following to the command line:


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

    file
  6. Click Finish. The project structure is created.

    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 please follow the procedure describe in Resolving Invalid Project Definition.

Troubleshooting

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

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 located 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>

        

Code samples are intended for illustration purposes only.

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

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:

Any questions?

Have a question about this or any other AEM topic? Ask our Community.
Learn more about AEM topics on our help hub.
Was this helpful?

By submitting your feedback, you accept the Adobe Terms of Use.

Thank you for submitting your feedback.