diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9ba3af9985..85e05dbfdc 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -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: @@ -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" @@ -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 diff --git a/README.md b/README.md index 0af01179b8..f49a7e69d2 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 ## Distribution @@ -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" - - diff --git a/all/pom.xml b/all/pom.xml index bace7ed491..d0fec1a768 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -33,7 +33,7 @@ acs-aem-commons-all - ACS AEM Commons Package + ACS AEM Commons Container Package (All) ACS AEM Commons container content package which delivers acs-aem-commons-ui.apps, acs-aem-commons-ui.content, the OSGi bundle and configuration. @@ -233,7 +233,7 @@ cloud - false + true ${project.build.directory}/${project.build.finalName}-cloud.zip diff --git a/pom.xml b/pom.xml index 914c3aacd2..caac77643b 100644 --- a/pom.xml +++ b/pom.xml @@ -165,7 +165,7 @@ maven-release-plugin 3.0.0-M5 - release + release,cloud true OddEvenVersionPolicy @@ -893,10 +893,13 @@ Service-Component: OSGI-INF/*.xml - cloud + + true + bundle-cloud @@ -913,7 +916,6 @@ Service-Component: OSGI-INF/*.xml bundle - bundle-cloud oakpal-checks ui.apps ui.content diff --git a/ui.apps/pom.xml b/ui.apps/pom.xml index 20df1b0b60..abd076840c 100644 --- a/ui.apps/pom.xml +++ b/ui.apps/pom.xml @@ -64,31 +64,6 @@ - - cloud-metadata - - generate-metadata - - - cloud - - - day/cq60/product - cq-content - [6.6,) - - - - - - cloud-package - - package - - - cloud - - @@ -238,6 +213,50 @@ + + cloud + + true + + + ${project.build.directory}/${project.build.finalName}-cloud.zip + + + + + org.apache.jackrabbit + filevault-package-maven-plugin + + + cloud-metadata + + generate-metadata + + + cloud + + + day/cq60/product + cq-content + [6.6,) + + + + + + cloud-package + + package + + + cloud + + + + + + + autoInstallUiAppsPackage @@ -245,6 +264,9 @@ com.day.jcr.vault content-package-maven-plugin + + ${contentPackageFile} + install-content-package