Skip to content

kristofvb/gradle-aem-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cognifide logo

Gradle Status Apache License, Version 2.0, January 2004

Gradle AEM Example


Gradle AEM Plugin Logo


Description

This project should be used while starting new project based on AEM. Currently Gradle does not support Maven's like archetypes, so you have to copy this project at start and customize it for your needs. Documentation for AEM plugin is available in project Gradle AEM Plugin.

Environment

Tested on:

  • Java 1.8
  • Gradle 3.5
  • Adobe AEM 6.2

Build

  1. Install Gradle
    • Use bundled wrapper (always use command sh gradlew instead of gradle). It will be downloaded automatically.
    • Use standalone from here.
  2. Run gradle idea or gradle eclipse to generate configuration for your favourite IDE.
  3. Build application using commands:
    • gradle contentDeploy or just gradle,
    • gradle bundleDeploy.

Tips & tricks

  • To run some task only for subproject, use project name as a prefix, for instance: sh gradlew :content:aemSync.
  • Bundle & content project can be combined into one. There is absolutely no need to have separate projects. Example project structure just tries to reflect Adobe Multi-Module Project Archetype.
  • Declare bundle dependencies available on AEM (Maven's provided scope) in root project build.gradle in section plugins.withId 'org.dm.bundle' to avoid defining them separately for each subproject.
  • According to recommendations, Gradle daemon should be:
    • enabled on development environments,
    • disabled on continuous integration environments.
  • If build caches to much, you could try with --rerun-tasks option. See this link for more details.
  • To see more descriptive details about errors, you could use -i, --stacktrace, --debug options.
  • To skip tests or any other task by name use -x test

Attaching debugger

  1. Execute build with options -Dorg.gradle.debug=true --no-daemon, it will suspend,
  2. Attach debugger on port 5005,
  3. Suspension will be released and build should stop at breakpoint.

Extending build

For defining new tasks directly in build see:

The easiest way to implement custom plugins and use them in project is a technique related with buildSrc/ directory. For more details please read documentation.

About

Example AEM application built by Gradle Build System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 63.0%
  • Java 37.0%