Git Product home page Git Product logo

aem-archunit's Introduction

Sample AEM project using ArchUnit tests

This is a simple project demonstrating how to apply ArchUnit tests/rules to AEM projects

  • ArchUnit is a Java library for checking the architecture of your Java code using Junit
  • It can check dependencies between packages and classes, layers and slices, check for cyclic dependencies and more.
  • For more info see: https://www.archunit.org/

Check out example AEM arhictecture tests here: https://github.com/dstr89/aem-archunit/blob/main/core/src/test/java/io/ecx/demo/core/architecture/ArchitectureRulesTest.java

Modules

The main parts of the template are:

  • core: Java bundle containing all core functionality like OSGi services, listeners or schedulers, as well as component-related Java code such as servlets or request filters.
  • it.tests: Java based integration tests
  • ui.apps: contains the /apps (and /etc) parts of the project, ie JS&CSS clientlibs, components, and templates
  • ui.content: contains sample content using the components from the ui.apps
  • ui.config: contains runmode specific OSGi configs for the project
  • ui.frontend: an optional dedicated front-end build mechanism (Angular, React or general Webpack project)
  • ui.tests: Selenium based UI tests
  • all: a single content package that embeds all of the compiled modules (bundles and content packages) including any vendor dependencies
  • analyse: this module runs analysis on the project which provides additional validation for deploying into AEMaaCS

How to build

To build all the modules run in the project root directory the following command with Maven 3:

mvn clean install

To build all the modules and deploy the all package to a local instance of AEM, run in the project root directory the following command:

mvn clean install -PautoInstallSinglePackage

Or to deploy it to a publish instance, run

mvn clean install -PautoInstallSinglePackagePublish

Or alternatively

mvn clean install -PautoInstallSinglePackage -Daem.port=4503

Or to deploy only the bundle to the author, run

mvn clean install -PautoInstallBundle

Or to deploy only a single content package, run in the sub-module directory (i.e ui.apps)

mvn clean install -PautoInstallPackage

aem-archunit's People

Contributors

dstr89 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.