Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/fix-default-for-dispatcherflushmode…
Browse files Browse the repository at this point in the history
…limpl
  • Loading branch information
davidjgonzalez authored Nov 15, 2023
2 parents 86ee1b8 + 519cda5 commit c17bd0f
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 56 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
# always act on the modified source code (even for event pull_request_target)
# is considered potentially unsafe (https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) but actions are only executed after approval from committers
with:
Expand All @@ -55,7 +55,7 @@ jobs:
persist-credentials: false

- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
cache: 'maven'
# Adobe is moving away from Azul Zulu to Oracle JDK (which is not an option) - Eclipse Temurin is suggested as the "closest thing"
Expand Down Expand Up @@ -88,9 +88,6 @@ jobs:
- name: ${{ matrix.namePrefix }} Build with Maven ${{ env.STEP_NAME_SUFFIX }}
run: mvn -e -B -V ${{ env.MVN_GOAL }} ${{ env.MVN_ADDITIONAL_OPTS }}

- name: ${{ matrix.namePrefix }} Build cloud all package with Maven ${{ env.STEP_NAME_SUFFIX }}
run: mvn -e -B -V -pl all -P cloud ${{ env.MVN_GOAL }} ${{ env.MVN_ADDITIONAL_OPTS }}

- name: Publish Test Report
if: ${{ always() }} # make sure to run even if previous Maven execution failed (due to failed test)
uses: scacap/action-surefire-report@v1
Expand Down
31 changes: 10 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# ACS AEM Commons

[![Maven Central](https://img.shields.io/maven-central/v/com.adobe.acs/acs-aem-commons-all)](https://central.sonatype.com/artifact/com.adobe.acs/acs-aem-commons-all)
[![Join the chat at https://gitter.im/Adobe-Consulting-Services/acs-aem-commons](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Adobe-Consulting-Services/acs-aem-commons?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://github.com/Adobe-Consulting-Services/acs-aem-commons/actions/workflows/maven.yml/badge.svg)](https://github.com/Adobe-Consulting-Services/acs-aem-commons/actions)

[![Code Climate Issues](https://img.shields.io/codeclimate/issues/Adobe-Consulting-Services/acs-aem-commons.svg)](https://codeclimate.com/github/Adobe-Consulting-Services/acs-aem-commons)

[![codecov](https://codecov.io/gh/Adobe-Consulting-Services/acs-aem-commons/branch/master/graph/badge.svg?token=KkCffH5xs4)](https://codecov.io/gh/Adobe-Consulting-Services/acs-aem-commons)

[![Maintainability](https://api.codeclimate.com/v1/badges/a1038e3e7f9c90dcaaa6/maintainability)](https://codeclimate.com/github/Adobe-Consulting-Services/acs-aem-commons/maintainability)

This project is a unified collection of AEM/CQ code generated by the AEM consulting practice.
Expand All @@ -16,21 +13,25 @@ This project is a unified collection of AEM/CQ code generated by the AEM consult

This project uses Maven for building. Common commands:

From the root directory, run ``mvn -PautoInstallPackage clean install`` to build the bundle and content package and install to a CQ instance.
From the root directory, run `mvn -PautoInstallPackage clean install` (for AEM 6.5) or `mvn -PautoInstallPackage,cloud clean install` (for AEMaaCS) to build the bundles and content packages and install the container package to an AEM instance.

From the bundle directory, run `mvn -PautoInstallBundle clean install` to build *just* the bundle and install to an AEM instance. In addition there is the profile `autoInstallUiAppsPackage` to just install the `ui.apps` package to AEM.

The Maven profile `cloud` is used to both build both the AEMaaCS and the AEM 6.5 packages/bundles as well as to optionally install the version targeted for AEMaaCS (with the additional profile `autoInstallPackage` or `autoInstallUiPackage`). It is automatically active when no other profile is activated via command line or `settings,.xml`.

From the bundle directory, run ``mvn -PautoInstallBundle clean install`` to build *just* the bundle and install to a CQ instance.
To build only the version for AEM 6.5 (without using any other profiles) use the command line option `-P \!cloud` [to deactivate the default profile `cloud`](https://maven.apache.org/guides/introduction/introduction-to-profiles.html#deactivating-a-profile).

## Using with VLT

To use vlt with this project, first build and install the package to your local CQ instance as described above. Then cd to `content/src/main/content/jcr_root` and run
To use vlt with this project, first build and install the package to your local AEM instance as described above. Then cd to `content/src/main/content/jcr_root` and run

vlt --credentials admin:admin checkout -f ../META-INF/vault/filter.xml --force http://localhost:4502/crx

Once the working copy is created, you can use the normal ``vlt up`` and ``vlt ci`` commands.

## Specifying CRX Host/Port
## Specifying AEM Host/Port

The CRX host and port can be specified on the command line with:
The AEM host and port can be specified on the command line with:
mvn -Dcrx.host=otherhost -Dcrx.port=5502 <goals>

## Distribution
Expand All @@ -48,15 +49,3 @@ Watch this space.
## Want commit rights?

* Create an issue.



mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate \
-D archetypeGroupId=com.adobe.aem \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=36\
-D appTitle="My Site" \
-D appId="acs-aem-commons" \
-D groupId="com.adobe.acs"


4 changes: 2 additions & 2 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<!-- ====================================================================== -->

<artifactId>acs-aem-commons-all</artifactId>
<name>ACS AEM Commons Package</name>
<name>ACS AEM Commons Container Package (All)</name>
<description>ACS AEM Commons container content package which delivers acs-aem-commons-ui.apps,
acs-aem-commons-ui.content, the OSGi bundle and configuration.
</description>
Expand Down Expand Up @@ -233,7 +233,7 @@
<profile>
<id>cloud</id>
<activation>
<activeByDefault>false</activeByDefault>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<contentPackageFile>${project.build.directory}/${project.build.finalName}-cloud.zip</contentPackageFile>
Expand Down
8 changes: 5 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<artifactId>maven-release-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<releaseProfiles>release</releaseProfiles>
<releaseProfiles>release,cloud</releaseProfiles>
<autoVersionSubmodules>true</autoVersionSubmodules>
<projectVersionPolicyId>OddEvenVersionPolicy</projectVersionPolicyId>
</configuration>
Expand Down Expand Up @@ -893,10 +893,13 @@ Service-Component: OSGI-INF/*.xml
</build>
</profile>

<!-- enable this profile to additionally build the packages/bundles for AEMaaCS,
<!-- disable this profile to not build/deploy the packages/bundles for AEMaaCS,
the ones for AEM on prem are always built -->
<profile>
<id>cloud</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>bundle-cloud</module>
</modules>
Expand All @@ -913,7 +916,6 @@ Service-Component: OSGI-INF/*.xml

<modules>
<module>bundle</module>
<module>bundle-cloud</module>
<module>oakpal-checks</module>
<module>ui.apps</module>
<module>ui.content</module>
Expand Down
72 changes: 47 additions & 25 deletions ui.apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,6 @@
</dependencies>
</configuration>
</execution>
<execution>
<id>cloud-metadata</id>
<goals>
<goal>generate-metadata</goal>
</goals>
<configuration>
<classifier>cloud</classifier>
<dependencies>
<dependency>
<group>day/cq60/product</group>
<name>cq-content</name>
<version>[6.6,)</version><!-- version shipped with AEM Cloud SDK -->
</dependency>
</dependencies>
</configuration>
</execution>
<execution>
<id>cloud-package</id>
<goals>
<goal>package</goal>
</goals>
<configuration>
<classifier>cloud</classifier>
</configuration>
</execution>
</executions>
</plugin>

Expand Down Expand Up @@ -238,13 +213,60 @@
</dependency>
</dependencies>
<profiles>
<profile>
<id>cloud</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<contentPackageFile>${project.build.directory}/${project.build.finalName}-cloud.zip</contentPackageFile>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<executions>
<execution>
<id>cloud-metadata</id>
<goals>
<goal>generate-metadata</goal>
</goals>
<configuration>
<classifier>cloud</classifier>
<dependencies>
<dependency>
<group>day/cq60/product</group>
<name>cq-content</name>
<version>[6.6,)</version><!-- version shipped with AEM Cloud SDK -->
</dependency>
</dependencies>
</configuration>
</execution>
<execution>
<id>cloud-package</id>
<goals>
<goal>package</goal>
</goals>
<configuration>
<classifier>cloud</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>autoInstallUiAppsPackage</id>
<build>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<configuration>
<packageFile>${contentPackageFile}</packageFile>
</configuration>
<executions>
<execution>
<id>install-content-package</id>
Expand Down

0 comments on commit c17bd0f

Please sign in to comment.