Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Example Single-Module AEM application built by Gradle Build System

License

NotificationsYou must be signed in to change notification settings

wttech/gradle-aem-single

Repository files navigation

WTT logo

Gradle StatusApache License, Version 2.0, January 2004

Gradle AEM Plugin logo

AEM Single-Project Example

Description

This project could be used to start developingapplication/library based on AEM.

To start developinglong-term project based on AEM it is recommended to useGradle AEM Multi instead.

Documentation for AEM plugin is available in projectGradle AEM Plugin.

Table of Contents

Quickstart

  1. Fork project using command:

    git clone https://github.com/wttech/gradle-aem-single.git&&cd gradle-aem-single&& sh gradlew fork

    and specify properties:

    Fork Props Dialog

    and wait until project is forked then enter configured target directory.

  2. Setup user specific project configuration using command:

    sh gradlew props

    and specify properties:

    Fork Props Dialog

  3. Setup local AEM instances and dependencies then build application using command:

    sh gradlew setup

    and wait till complete AEM environment will be ready to use.

  4. Develop continuously application using command:

    sh gradlew

Environment

Tested on:

  • Java 1.8
  • Gradle 6.3
  • Adobe AEM 6.5

Building

  1. Use commandgradlew so that Gradle in version according to project will be downloaded automatically.
  2. Deploy application:sh gradlew <=>sh gradlew :packageDeploy

Tooling

  1. Monitoring errors in logs:sh gradlew :instanceTail,
  2. Synchronizing JCR content from AEM to local file system:sh gradlew :sync,
  3. Copying JCR content between AEM instances:sh gradlew :rcp -Prcp.source=http://user:pass@x.x.x.x:4502 -Prcp.target=local-author -Prcp.paths=[/content/example,/content/dam/example]

Tips & tricks

  • According torecommendations, Gradle daemon should be:
    • enabled on development environments,
    • disabled on continuous integration environments.
  • To see more descriptive errors or want to skip some tasks, see command linedocumentation.

Running tests

IntelliJ

Certain unit tests may depend on the results of running gradle tasks. One such example is the testing of OSGi Services usingOSGi Mocks where in order to run a test, the SCR metadata must be available for a class. Running a test like this in IntelliJ results in errors because the IDE is not aware of the Bundle plugin.

This can be worked around by configuring IntelliJ to delegate test execution to Gradle. In order to set this up, go toSettings > Build, Execution, Deployment > Gradle > Runner and set your IDE to delegate IDE build/run actions to Gradle. Alternatively, you can use a dropdown menu to use a specific runner or to decide on a test-by-test basis.

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 withbuildSrc/ directory.For more details please readdocumentation.

Packages

No packages published

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp