Skip to content

Commit 3b9188a

Browse files
conga-aem-maven-plugin: Configure package type validation (#6)
1 parent 958833a commit 3b9188a

31 files changed

Lines changed: 429 additions & 32 deletions

File tree

changes.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 https://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
2424
<body>
2525

26-
<release version="2.16.4" date="not released">
26+
<release version="2.17.0" date="not released">
27+
<action type="add" dev="sseifert">
28+
conga-aem-maven-plugin: Add new parameter packageTypeValidation which controls how to handle packages with invalid or without package types.
29+
</action>
2730
<action type="update" dev="sseifert">
2831
Content Package Validator: Update to filevault-package-maven-plugin 1.3.0.
2932
</action>

tooling/conga-aem-maven-plugin/src/it/example/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,24 @@
4747
<version>1.0.0</version>
4848
<type>zip</type>
4949
</dependency>
50+
51+
<!-- ACS AEM Commons -->
52+
<dependency>
53+
<groupId>com.adobe.acs</groupId>
54+
<artifactId>acs-aem-commons-ui.apps</artifactId>
55+
<classifier>min</classifier>
56+
<version>5.0.10</version>
57+
<type>zip</type>
58+
<scope>compile</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>com.adobe.acs</groupId>
62+
<artifactId>acs-aem-commons-ui.content</artifactId>
63+
<classifier>min</classifier>
64+
<version>5.0.10</version>
65+
<type>zip</type>
66+
<scope>compile</scope>
67+
</dependency>
5068

5169
</dependencies>
5270

tooling/conga-aem-maven-plugin/src/it/example/src/main/roles/aem.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ files:
133133
custom.property1: value1
134134
custom.property2: 123
135135

136+
# ACS AEM Commons
137+
- url: mvn:com.adobe.acs/acs-aem-commons-ui.apps//zip/min
138+
dir: packages
139+
- url: mvn:com.adobe.acs/acs-aem-commons-ui.content//zip/min
140+
dir: packages
141+
136142

137143
# Defines configuration parameters and default values
138144
config:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invoker.goals = clean verify
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
#%L
4+
wcm.io
5+
%%
6+
Copyright (C) 2022 wcm.io
7+
%%
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
#L%
20+
-->
21+
22+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<parent>
27+
<groupId>io.wcm.maven</groupId>
28+
<artifactId>io.wcm.maven.global-parent</artifactId>
29+
<version>36</version>
30+
<relativePath/>
31+
</parent>
32+
33+
<groupId>io.wcm.devops.conga.plugins.aem.it</groupId>
34+
<artifactId>io.wcm.devops.conga.plugins.aem.it.mixed-no-package-type</artifactId>
35+
<packaging>config</packaging>
36+
<version>1-SNAPSHOT</version>
37+
38+
<name>Mixed/No Package Type</name>
39+
<description>Test case with packages with "mixed" package types, and packages without package type and "all" package.</description>
40+
41+
<dependencies>
42+
43+
<!-- ACS AEM Commons -->
44+
<dependency>
45+
<groupId>com.adobe.acs</groupId>
46+
<artifactId>acs-aem-commons-ui.apps</artifactId>
47+
<classifier>min</classifier>
48+
<version>5.0.10</version>
49+
<type>zip</type>
50+
<scope>compile</scope>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.adobe.acs</groupId>
54+
<artifactId>acs-aem-commons-ui.content</artifactId>
55+
<classifier>min</classifier>
56+
<version>5.0.10</version>
57+
<type>zip</type>
58+
<scope>compile</scope>
59+
</dependency>
60+
61+
</dependencies>
62+
63+
<build>
64+
65+
<plugins>
66+
67+
<plugin>
68+
<groupId>io.wcm.devops.conga</groupId>
69+
<artifactId>conga-maven-plugin</artifactId>
70+
<version>1.14.7-SNAPSHOT</version>
71+
<extensions>true</extensions>
72+
<dependencies>
73+
74+
<!-- Activate further CONGA plugins for special file types -->
75+
<dependency>
76+
<groupId>io.wcm.devops.conga.plugins</groupId>
77+
<artifactId>io.wcm.devops.conga.plugins.aem</artifactId>
78+
<version>@project.version@</version>
79+
</dependency>
80+
81+
</dependencies>
82+
</plugin>
83+
84+
<plugin>
85+
<groupId>io.wcm.devops.conga.plugins</groupId>
86+
<artifactId>conga-aem-maven-plugin</artifactId>
87+
<version>@project.version@</version>
88+
<executions>
89+
90+
<!-- Generate "all" packages including all packages from CONGA configuration for deployment via Adobe Cloud Manager -->
91+
<execution>
92+
<id>cloudmanager-all-package</id>
93+
<phase>generate-resources</phase>
94+
<goals>
95+
<goal>cloudmanager-all-package</goal>
96+
</goals>
97+
<configuration>
98+
<group>it</group>
99+
<!-- Allow packages with mixed mode and without package type -->
100+
<packageTypeValidation>WARN</packageTypeValidation>
101+
</configuration>
102+
</execution>
103+
104+
</executions>
105+
</plugin>
106+
107+
<!-- do not deploy this example into maven repository -->
108+
<plugin>
109+
<groupId>org.apache.maven.plugins</groupId>
110+
<artifactId>maven-deploy-plugin</artifactId>
111+
<inherited>false</inherited>
112+
<configuration>
113+
<skip>true</skip>
114+
</configuration>
115+
</plugin>
116+
117+
<!-- do not generate site for this project -->
118+
<plugin>
119+
<groupId>org.apache.maven.plugins</groupId>
120+
<artifactId>maven-site-plugin</artifactId>
121+
<configuration>
122+
<skip>true</skip>
123+
<skipDeploy>true</skipDeploy>
124+
</configuration>
125+
</plugin>
126+
127+
</plugins>
128+
</build>
129+
130+
</project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Defines an environment
2+
3+
nodes:
4+
5+
# Example nodes
6+
- node: aem
7+
roles:
8+
- role: aem
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
templateDir: aem
2+
3+
files:
4+
5+
# Define a AEM content package with "mixed" package type
6+
- file: content-sample.json
7+
dir: packages
8+
template: content-sample.json.hbs
9+
# Transform JSON file to AEM content package
10+
postProcessors:
11+
- aem-contentpackage
12+
postProcessorOptions:
13+
contentPackage:
14+
name: content-sample
15+
packageType: mixed
16+
rootPath: /content/sample
17+
18+
# ACS AEM Commons
19+
- url: mvn:com.adobe.acs/acs-aem-commons-ui.apps//zip/min
20+
dir: packages
21+
- url: mvn:com.adobe.acs/acs-aem-commons-ui.content//zip/min
22+
dir: packages
23+
24+
25+
# Defines configuration parameters and default values
26+
config:
27+
28+
contentPackage:
29+
group: sample
30+
version: "${version}"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"jcr:primaryType": "sling:Folder"
3+
}

tooling/conga-aem-maven-plugin/src/it/wcmio-aem-archetype/archetype-params.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mvn org.apache.maven.plugins:maven-archetype-plugin:3.1.0:generate -Dinteractive
2020
-DoptionWcmioHandler=y \
2121
-DoptionSlingModelsLatest=n \
2222
-DoptionContextAwareConfigLatest=n \
23-
-DoptionAcsCommons=n \
23+
-DoptionAcsCommons=y \
2424
-DoptionFrontend=n \
2525
-DoptionNodeJsPlugin=n \
2626
-DoptionIntegrationTests=n

tooling/conga-aem-maven-plugin/src/it/wcmio-aem-archetype/archetype.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ optionContextAwareConfig=y
2222
optionFrontend=n
2323
optionNodeJsPlugin=n
2424
optionWcmioHandler=y
25-
optionAcsCommons=n
25+
optionAcsCommons=y
2626
optionIntegrationTests=n

0 commit comments

Comments
 (0)