Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Jun 23, 2022
2 parents 4236b23 + 3e4318b commit e875fe6
Show file tree
Hide file tree
Showing 38 changed files with 100 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<img src="https://wcm.io/images/[email protected]"/> wcm.io Maven Archetype for AEM
======
[![Build](https://github.com/wcm-io/io.wcm.maven.archetypes.aem/workflows/Build/badge.svg?branch=develop)](https://github.com/wcm-io/io.wcm.maven.archetypes.aem/actions?query=workflow%3ABuild+branch%3Adevelop)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.wcm.maven.archetypes/io.wcm.maven.archetypes.aem/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.wcm.maven.archetypes/io.wcm.maven.archetypes.aem)
[![Maven Central](https://img.shields.io/maven-central/v/io.wcm.maven.archetypes/io.wcm.maven.archetypes.aem)](https://repo1.maven.org/maven2/io/wcm/maven/archetypes/io.wcm.maven.archetypes.aem)

Maven Archetype for creating new AEM projects.

Expand Down
16 changes: 16 additions & 0 deletions changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 https://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
<body>

<release version="3.6.4" date="2022-06-23">
<action type="add" dev="sseifert">
Add new parameter optionAemServicePackAPI which allows to configure independently from optionAemServicePack if an AEM 6.5 project should be set up to compile against latest AEM service pack API or not.
This option does not depend on the service pack binaries not available in Maven central.
</action>
<action type="update" dev="sseifert">
AEM 6.5.13 is minimum version (due to Core Components).
</action>
<action type="update" dev="sseifert">
Update dependencies.
</action>
<action type="fix" dev="mrozati" issue="WTOOL-95">
Include acs-aem-commons-bundle in CONGA role/complete package as it is no longer included in acs-commons-ui.apps package since 3.5.0.
</action>
</release>

<release version="3.6.2" date="2022-06-16">
<action type="update" dev="sseifert">
CONGA "all" package generation: Set runModeOptimization=ELIMINATE_DUPLICATES which produces only a single "all" package.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<groupId>io.wcm.maven.archetypes</groupId>
<artifactId>io.wcm.maven.archetypes.aem</artifactId>
<version>3.6.2</version>
<version>3.6.4</version>
<packaging>maven-archetype</packaging>

<name>wcm.io Maven Archetype for AEM</name>
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/META-INF/archetype-post-generate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import groovy.util.XmlSlurper
def rootDir = new File(request.getOutputDirectory() + "/" + request.getArtifactId())
def javaPackage = request.getProperties().get("package")
def optionAemVersion = request.getProperties().get("optionAemVersion")
def optionAemServicePack = request.getProperties().get("optionAemServicePack")
def optionAemServicePackAPI = request.getProperties().get("optionAemServicePackAPI")
def optionSlingInitialContentBundle = request.getProperties().get("optionSlingInitialContentBundle")
def optionEditableTemplates = request.getProperties().get("optionEditableTemplates")
def optionMultiBundleLayout = request.getProperties().get("optionMultiBundleLayout")
Expand All @@ -28,8 +30,8 @@ def parentPom = new File(rootDir, "parent/pom.xml")
def tests = new File(rootDir, "tests")

// validate parameters - throw exceptions for invalid combinations
if (optionAemServicePack == "y" && optionAemVersion == "cloud") {
throw new RuntimeException("For AEMaaCS optionAemServicePack='y' is not allowed - there are no service packs for the cloud.")
if ((optionAemServicePack=="y" || optionAemServicePackAPI=="y") && optionAemVersion == "cloud") {
throw new RuntimeException("For AEMaaCS optionAemServicePack='y' or optionAemServicePackAPI='y' is not allowed - there are no service packs for the cloud.")
}
if (optionMultiBundleLayout == "y" && optionSlingInitialContentBundle == "n") {
throw new RuntimeException("Parameter optionMultiBundleLayout='y' is only supported with optionSlingInitialContentBundle='y'.")
Expand Down
7 changes: 6 additions & 1 deletion src/main/resources/META-INF/maven/archetype-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,16 @@
<defaultValue>cloud</defaultValue>
<validationRegex>^(6\.5|cloud)$</validationRegex>
</requiredProperty>
<!-- Use latest service pack for AEM version - you need to deploy artifacts following these conventions https://wcm-io.atlassian.net/wiki/x/AYC9Aw -->
<!-- Use latest service pack for AEM 6.5. You need to deploy artifacts following these conventions https://wcm-io.atlassian.net/wiki/x/AYC9Aw -->
<requiredProperty key="optionAemServicePack">
<defaultValue>n</defaultValue>
<validationRegex>^(y|n)$</validationRegex>
</requiredProperty>
<!-- Use AEM API from latest service pack for AEM 6.5. This is implicitly activated if optionAemServicePack = y. -->
<requiredProperty key="optionAemServicePackAPI">
<defaultValue>n</defaultValue>
<validationRegex>^(y|n)$</validationRegex>
</requiredProperty>
<!-- y: AEM application projects is set up with scripts and content parts as JSON files within the OSGi bundle with Sling-Initial Content, suitable for File System Resource Provider. Works with all AEM versions.
n: Projects are set up with FileVault package layout, suitable for AEM Developer Tools for Eclipse (Sling IDE). -->
<requiredProperty key="optionSlingInitialContentBundle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ aemPublishPort=${aemPublishPort}
optionAemVersion=${optionAemVersion}
optionJavaVersion=${optionJavaVersion}
optionAemServicePack=${optionAemServicePack}
optionAemServicePackAPI=${optionAemServicePackAPI}
optionSlingModelsLatest=${optionSlingModelsLatest}
optionSlingInitialContentBundle=${optionSlingInitialContentBundle}
optionEditableTemplates=${optionEditableTemplates}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/archetype-resources/bundles/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<artifactId>io.wcm.testing.aem-mock.junit5</artifactId>
<scope>test</scope>
</dependency>
#if ( $optionAemVersion == "6.5" && $optionAemServicePack=="y" )
#if ( $optionAemVersion == "6.5" && ($optionAemServicePack=="y" || $optionAemServicePackAPI=="y") )
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.testing.logging.logback</artifactId>
Expand Down Expand Up @@ -211,7 +211,7 @@
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
#if ( $optionAemVersion == "6.5" && $optionAemServicePack=="n" )
#if ( $optionAemVersion == "6.5" && $optionAemServicePack=="n" && $optionAemServicePackAPI=="n" )
<classifier>apis</classifier>
#end
<scope>provided</scope>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@
#end
#if( $optionAcsCommons == "y" )
<!-- ACS AEM Commons -->
#if ( $optionAemVersion == "cloud" )
<dependency>
<groupId>com.adobe.acs</groupId>
<artifactId>acs-aem-commons-bundle</artifactId>
<scope>compile</scope>
</dependency>
#end
<dependency>
<groupId>com.adobe.acs</groupId>
<artifactId>acs-aem-commons-ui.apps</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ files:
#end
#if( $optionAcsCommons == "y" )
# ACS AEM Commons
#if ( $optionAemVersion == "cloud" )
- url: mvn:com.adobe.acs/acs-aem-commons-bundle
dir: bundles
#end
- url: mvn:com.adobe.acs/acs-aem-commons-ui.apps//zip
dir: packages
postProcessorOptions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
</dependency>
#end

#if ( $optionAcsCommons == "y" && $optionAemVersion != "cloud" )
<!-- ACS AEM Commons -->
<dependency>
<groupId>com.adobe.acs</groupId>
<artifactId>acs-aem-commons-bundle</artifactId>
<scope>compile</scope>
</dependency>

#end
</dependencies>

<build>
Expand Down Expand Up @@ -161,6 +170,18 @@
<type>jar</type>
</embedded>
#end
#end
#if( $optionAcsCommons == "y" && $optionAemVersion != "cloud" )
<!-- ACS AEM Commons -->
<embedded>
<groupId>
com.adobe.acs
</groupId>
<artifactId>
acs-aem-commons-bundle
</artifactId>
<type>jar</type>
</embedded>
#end
</embeddeds>

Expand Down
22 changes: 11 additions & 11 deletions src/main/resources/archetype-resources/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.wcm.maven</groupId>
<artifactId>io.wcm.maven.aem-global-parent</artifactId>
<version>2.0.10</version>
<version>2.0.12</version>
<relativePath/>
</parent>

Expand Down Expand Up @@ -37,10 +37,10 @@
<!-- Versions -->
#end
#if ( $optionAemVersion != "cloud" )
<core.wcm.components.version>2.19.2</core.wcm.components.version>
<core.wcm.components.version>2.20.2</core.wcm.components.version>
#end
#if( $optionAcsCommons == "y" )
<acs.aem.commons.version>5.3.0</acs.aem.commons.version>
<acs.aem.commons.version>5.3.2</acs.aem.commons.version>
#end

<!-- Enable reproducible builds -->
Expand Down Expand Up @@ -162,7 +162,7 @@
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.sling.commons</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>io.wcm</groupId>
Expand Down Expand Up @@ -200,13 +200,13 @@
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.wcm.ui.granite</artifactId>
<version>1.9.4</version>
<version>1.9.6</version>
</dependency>
#if ( $optionAemVersion == "cloud" )
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.wcm.ui.granite</artifactId>
<version>1.9.4</version>
<version>1.9.6</version>
<classifier>content</classifier>
<type>zip</type>
</dependency>
Expand Down Expand Up @@ -289,13 +289,13 @@
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.wcm.core.components</artifactId>
<version>1.11.0-2.19.0</version>
<version>1.12.0-2.20.0</version>
</dependency>
#if ( $optionAemVersion == "cloud" )
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.wcm.core.components</artifactId>
<version>1.11.0-2.19.0</version>
<version>1.12.0-2.20.0</version>
<classifier>content</classifier>
<type>zip</type>
</dependency>
Expand All @@ -313,7 +313,7 @@
<artifactId>io.wcm.testing.aem-mock.junit5</artifactId>
<version>5.0.0</version>
</dependency>
#if ( $optionAemVersion == "6.5" && $optionAemServicePack=="y" )
#if ( $optionAemVersion == "6.5" && ($optionAemServicePack=="y" || $optionAemServicePackAPI=="y") )
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.testing.logging.logback</artifactId>
Expand Down Expand Up @@ -368,7 +368,7 @@
<dependency>
<groupId>io.wcm.maven</groupId>
<artifactId>io.wcm.maven.aem-dependencies</artifactId>
<version>#if($optionAemServicePack=="y")6.5.13.0000#{else}6.5.0.0005#end</version>
<version>#if($optionAemServicePack=="y" || $optionAemServicePackAPI=="y")6.5.13.0000#{else}6.5.0.0005#end</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -426,7 +426,7 @@
<type>pom</type>
<scope>import</scope>
</dependency>
#set( $mockitoVersion = "4.5.1" )
#set( $mockitoVersion = "4.6.1" )
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions src/site/markdown/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ About Maven Archetype for AEM

Maven Archetype for creating new AEM projects.

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.wcm.maven.archetypes/io.wcm.maven.archetypes.aem/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.wcm.maven.archetypes/io.wcm.maven.archetypes.aem)
[![Maven Central](https://img.shields.io/maven-central/v/io.wcm.maven.archetypes/io.wcm.maven.archetypes.aem)](https://repo1.maven.org/maven2/io/wcm/maven/archetypes/io.wcm.maven.archetypes.aem)


### Documentation
Expand All @@ -18,7 +18,7 @@ The wcm.io Maven Archetype for AEM allows you to set up new Maven projects for d

Features:

* Supports AEM 6.5 and AEM as a Cloud Service (AEMaaCS)
* Supports AEM 6.5 (with latest service pack) and AEM as a Cloud Service (AEMaaCS)
* Supports Java 8 and Java 11
* Unit Tests based on JUnit 5 and [AEM Mocks][aem-mock]
* Supports both Sling-Initial-Content JSON-style project layout and FileVault package layout
Expand Down
5 changes: 4 additions & 1 deletion src/site/markdown/usage.md.vm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ ${symbol_pound}${symbol_pound}${symbol_pound} Archetype parameters
| **aemPublishPort** | 4503 | Default port for local AEM publish instance
| **optionJavaVersion** | 8 | Java version (8 or 11)
| **optionAemVersion** | cloud | AEM major version (`6.5` or `cloud`)
| **optionAemServicePack** | n | Use latest service pack for AEM version - you need to deploy artifacts following [these conventions][aem-binaries-conventions]
| **optionAemServicePack** | n | Use latest service pack for AEM 6.5. You need to deploy artifacts following [these conventions][aem-binaries-conventions]
| **optionAemServicePackAPI** | n | Use AEM API from latest service pack for AEM 6.5. This is implicitly activated if optionAemServicePack = y.
| **optionSlingInitialContentBundle** | y | **y**: AEM application projects is set up with scripts and content parts as JSON files within the OSGi bundle with Sling-Initial Content, suitable for [File System Resource Provider][fsresource-adaptto-talk]. _Works with all AEM versions._<br/>**n**: Projects are set up with FileVault package layout, suitable for [AEM Developer Tools for Eclipse][aem-eclipse-ide] ([Sling IDE][sling-eclipse-ide]).
| **optionSlingInitialContentBundleContentPackage** | n | If set to **'y'**: Generate application content package out of Sling-Initial-Content store in OSGi bundles as workaround in AEMaaCS e.g. if the bundle contains client libraries hookind into Page Editor, see https://wcm-io.atlassian.net/l/c/ECGe9qZT
| **optionEditableTemplates** | y | Set up projects using editable templates.
Expand Down Expand Up @@ -68,6 +69,7 @@ mvn org.apache.maven.plugins:maven-archetype-plugin:${project.properties['maven.
-DoptionJavaVersion=11 \
-DoptionAemVersion=cloud \
-DoptionAemServicePack=n \
-DoptionAemServicePackAPI=n \
-DoptionSlingInitialContentBundle=n \
-DoptionEditableTemplates=y \
-DoptionMultiBundleLayout=n \
Expand Down Expand Up @@ -99,6 +101,7 @@ mvn org.apache.maven.plugins:maven-archetype-plugin:${project.properties['maven.
-DoptionJavaVersion=11 \
-DoptionAemVersion=6.5 \
-DoptionAemServicePack=n \
-DoptionAemServicePackAPI=n \
-DoptionSlingInitialContentBundle=y \
-DoptionEditableTemplates=y \
-DoptionMultiBundleLayout=n \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=45035
optionAemVersion=6.5
optionJavaVersion=11
optionAemServicePack=n
optionAemServicePackAPI=y
optionSlingInitialContentBundle=y
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=4503
optionAemVersion=cloud
optionJavaVersion=11
optionAemServicePack=n
optionAemServicePackAPI=n
optionSlingInitialContentBundle=y
optionSlingInitialContentBundleContentPackage=y
optionEditableTemplates=n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=45035
optionAemVersion=6.5
optionJavaVersion=11
optionAemServicePack=n
optionAemServicePackAPI=y
optionSlingInitialContentBundle=y
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=4503
optionAemVersion=cloud
optionJavaVersion=11
optionAemServicePack=n
optionAemServicePackAPI=n
optionSlingInitialContentBundle=y
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=45035
optionAemVersion=6.5
optionJavaVersion=11
optionAemServicePack=n
optionAemServicePackAPI=y
optionSlingInitialContentBundle=n
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=4503
optionAemVersion=cloud
optionJavaVersion=8
optionAemServicePack=n
optionAemServicePackAPI=n
optionSlingInitialContentBundle=n
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=45035
optionAemVersion=6.5
optionJavaVersion=11
optionAemServicePack=n
optionAemServicePackAPI=y
optionSlingInitialContentBundle=n
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=4503
optionAemVersion=cloud
optionJavaVersion=8
optionAemServicePack=n
optionAemServicePackAPI=n
optionSlingInitialContentBundle=n
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=45035
optionAemVersion=6.5
optionJavaVersion=11
optionAemServicePack=n
optionAemServicePackAPI=y
optionSlingInitialContentBundle=n
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=4503
optionAemVersion=cloud
optionJavaVersion=8
optionAemServicePack=n
optionAemServicePackAPI=n
optionSlingInitialContentBundle=n
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=45035
optionAemVersion=6.5
optionJavaVersion=11
optionAemServicePack=y
optionAemServicePackAPI=y
optionSlingInitialContentBundle=y
optionSlingInitialContentBundleContentPackage=n
optionEditableTemplates=n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ aemPublishPort=4503
optionAemVersion=cloud
optionJavaVersion=11
optionAemServicePack=n
optionAemServicePackAPI=n
optionSlingInitialContentBundle=y
optionSlingInitialContentBundleContentPackage=y
optionEditableTemplates=n
Expand Down
Loading

0 comments on commit e875fe6

Please sign in to comment.