AEM Component Generator
- Ignacio Mancilla
- May 20
- 2 min read
Speed up your AEM development process by automating component creation.
The AEM Component Generator is a developer tool designed to streamline the creation of Adobe Experience Manager (AEM) components. Built for speed and consistency, this Maven plugin allows engineering teams to scaffold fully functional components in seconds—directly from the command line.What is the AEM Component Generator?
This plugin reduces the repetitive work of setting up new components in AEM projects. It automatically generates HTL markup, dialogs, Sling models, and corresponding unit tests—structured and ready to deploy. By relying on standardized templates, it ensures consistency across teams and environments. Key Features
Dialog Generation
Automatically creates component dialogs with fields like text, number, checkbox, radio, select, and multifields.HTL and Clientlib Support
Includes pre-wired component.html templates, with optional clientlib inclusion.
Sling Model & Test Generation
Builds Java Sling models and JUnit tests from predefined templates—placed in the correct core structure.
Auto-detects Project Structure
Finds your /apps/<your-site> folder and places components in the correct location, including /components/content if applicable.
Minimal Configuration
Just pass the component name and group. All fields are generated by default—no flags required.
Benefits
Save development time
Create AEM components in seconds instead of manually crafting dialogs and models.
Reduce human error
Avoid typos or misconfigurations when setting up component files.
Ensure consistency
Use the same patterns and structure across large teams and codebases.
Boost onboarding speed
Help new developers start delivering faster with an automated setup.
When Should You Use It?
This plugin is ideal for:
Creating content components with structured fieldsRapid prototyping or MVP phases
Ensuring development consistency in multi-developer projectsAEMaaCS or AEM 6.5+ compatible environments
How It Works
You simply run:
mvn com.anseris:aem-component-generator:1.0.0:generate \
-DcomponentName="My Component" \
-DcomponentGroup="WKND.Content" \
-DmodelPackage="com.adobe.aem.guides.core.models"

This generates:
/apps/<your-site>/components/content/mycomponent/
All related .html, .content.xml, cqdialog, and design dialog files
A Sling Model: MyComponentModel.jav
A JUnit Test: MyComponentModelTest.java

Conclusion
The AEM Component Generator by Anseris is your shortcut to faster, cleaner, and more scalable AEM development. Whether you’re building for AEM Sites, AEMaaCS, or handling high-volume enterprise projects, this tool eliminates the busywork—so you can focus on creating meaningful experiences.
Created by: Pablo Palacios Aranda
LinkedIn: https://www.linkedin.com/in/pabpalac
Commenti