Skip to content

Commit 0c52383

Browse files
committed
add integration test based on AEM archetype project
1 parent 39604d2 commit 0c52383

180 files changed

Lines changed: 32204 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Declare text files with unix file ending
2+
*.any text eol=lf
3+
*.cfg text eol=lf
4+
*.conf text eol=lf
5+
*.config text eol=lf
6+
*.css text eol=lf
7+
*.dtd text eol=lf
8+
*.esp text eol=lf
9+
*.ecma text eol=lf
10+
*.farm text eol=lf
11+
*.gdsl text eol=lf
12+
*.groovy text eol=lf
13+
*.hbrs text eol=lf
14+
*.hbs text eol=lf
15+
*.htm text eol=lf
16+
*.html text eol=lf
17+
*.java text eol=lf
18+
*.jpage text eol=lf
19+
*.js text eol=lf
20+
*.json text eol=lf
21+
*.jsp text eol=lf
22+
*.md text eol=lf
23+
*.mustache text eol=lf
24+
*.tld text eol=lf
25+
*.launch text eol=lf
26+
*.log text eol=lf
27+
*.php text eol=lf
28+
*.pl text eol=lf
29+
*.project text eol=lf
30+
*.properties text eol=lf
31+
*.props text eol=lf
32+
*.py text eol=lf
33+
*.rules text eol=lf
34+
*.sass text eol=lf
35+
*.scss text eol=lf
36+
*.sh text eol=lf
37+
*.shtm text eol=lf
38+
*.shtml text eol=lf
39+
*.sql text eol=lf
40+
*.svg text eol=lf
41+
*.tf text eol=lf
42+
*.ts text eol=lf
43+
*.txt text eol=lf
44+
*.vhost text eol=lf
45+
*.vm text eol=lf
46+
*.xml text eol=lf
47+
*.xsd text eol=lf
48+
*.xsl text eol=lf
49+
*.xslt text eol=lf
50+
*.yml text eol=lf
51+
*.yaml text eol=lf
52+
53+
54+
# Declare windows-specific text files with windows file ending
55+
*.asp text eol=crlf
56+
*.asax text eol=crlf
57+
*.asa text eol=crlf
58+
*.aspx text eol=crlf
59+
*.bat text eol=crlf
60+
*.cmd text eol=crlf
61+
*.cs text eol=crlf
62+
*.csproj text eol=crlf
63+
*.reg text eol=crlf
64+
*.sln text eol=crlf
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
target/
2+
pom.xml.tag
3+
pom.xml.releaseBackup
4+
pom.xml.versionsBackup
5+
pom.xml.next
6+
release.properties
7+
maven-eclipse.xml
8+
infinitest.filters
9+
10+
node_modules/
11+
npm-debug.log
12+
13+
.nodejs
14+
.project
15+
.classpath
16+
.settings
17+
.externalToolBuilders
18+
.pmd
19+
.eclipse-pmd
20+
.checkstyle
21+
.idea
22+
.vagrant
23+
*.iml
24+
.DS_Store
25+
*.retry
26+
.rubygems
27+
.sass-cache
28+
.rubygems-gem-maven-plugin
29+
*.sublime-*
30+
*nbactions*.xml
31+
.temp/
32+
.vlt
33+
.vlt-sync*
34+
.brackets.json
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
wcmio-aem-archetype
2+
===================
3+
4+
This is an AEM project set up with the [wcm.io Maven Archetype for AEM][wcmio-maven-archetype-aem].
5+
6+
7+
### Build and deploy
8+
9+
To build the application run
10+
11+
```
12+
mvn clean install
13+
```
14+
15+
To build and deploy the application to your local AEM instance use these scripts:
16+
17+
* `build-deploy.sh` - Build and deploy to author instance
18+
* `build-deploy-publish.sh` - Build and deploy to publish instance
19+
* `build-deploy-author-and-publish.sh` - Build, and then deploy to author and publish instance (in parallel)
20+
21+
The first deployment may take a while until all updated OSGi bundles are installed.
22+
23+
After deployment you can open the sample content page in your browser:
24+
25+
* Author: http://localhost:4502/editor.html/content/wcmio-aem-archetype/en.html
26+
* Publish: http://localhost:4503/content/wcmio-aem-archetype/en.html
27+
28+
You can deploy individual bundles or content packages to the local AEM instances by using:
29+
30+
* `mvn -Pfast cq:install` - Install and deploy bundle or content package to author instance
31+
* `mvn -Pfast,publish cq:install` - Install and deploy bundle or content package to publish instance
32+
33+
### System requirements
34+
35+
* Java 8
36+
* Apache Maven 3.6.0 or higher
37+
* AEMaaCS SDK author instance running on port 4502
38+
* Optional: AEMaaCS SDK publish instance running on port 4503
39+
40+
41+
### Project overview
42+
43+
Modules of this project:
44+
45+
* [parent](parent/): Parent POM with dependency management for the whole project. All 3rdparty artifact versions used in the project are defined here.
46+
* [bundles/core](bundles/core/): OSGi bundle containing:
47+
* Java classes (e.g. Sling Models, Servlets, business logic) with unit tests
48+
* AEM components with their scripts and dialog definitions (included as `Sling-Initial-Content`)
49+
* i18n
50+
* HTML client libraries with JavaScript and CSS
51+
* [content-packages/complete](content-packages/complete/): AEM content package containing all OSGi bundles of the application and their dependencies
52+
* [content-packages/conf-content](content-packages/conf-content/): AEM content package with editable templates stored at `/conf`
53+
* [content-packages/sample-content](content-packages/sample-content/): AEM content package containing sample content (for development and test purposes)
54+
* [config-definition](config-definition/): Defines the CONGA roles and templates for this application. Also contains a `development` CONGA environment for deploying to local development instances.
55+
56+
57+
[wcmio-maven-archetype-aem]: https://wcm.io/tooling/maven/archetypes/aem/
58+
[wcmio-maven]: https://wcm.io/maven.html
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
mvn org.apache.maven.plugins:maven-archetype-plugin:3.1.0:generate -DinteractiveMode=false \
2+
-DarchetypeGroupId=io.wcm.maven.archetypes \
3+
-DarchetypeArtifactId=io.wcm.maven.archetypes.aem \
4+
-DarchetypeVersion=3.5.2 \
5+
-DprojectName=wcmio-aem-archetype \
6+
-DgroupId=io.wcm.devops.conga.plugins.aem.it \
7+
-DartifactId=io.wcm.devops.conga.plugins.aem.it.aemsample \
8+
-Dversion=1.0.0-SNAPSHOT \
9+
-Dpackage=io.wcm.devops.conga.plugins.aem.it.aemsample \
10+
-DpackageGroupName=it \
11+
-DaemAuthorPort=4502 \
12+
-DaemPublishPort=4503 \
13+
-DoptionJavaVersion=8 \
14+
-DoptionAemVersion=cloud \
15+
-DoptionAemServicePack=n \
16+
-DoptionSlingInitialContentBundle=y \
17+
-DoptionEditableTemplates=y \
18+
-DoptionMultiBundleLayout=n \
19+
-DoptionContextAwareConfig=y \
20+
-DoptionWcmioHandler=y \
21+
-DoptionSlingModelsLatest=n \
22+
-DoptionContextAwareConfigLatest=n \
23+
-DoptionAcsCommons=n \
24+
-DoptionFrontend=n \
25+
-DoptionNodeJsPlugin=n \
26+
-DoptionIntegrationTests=n
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Parameters used to generate this project with https://wcm.io/tooling/maven/archetypes/aem/
2+
3+
# basic properties
4+
projectName=wcmio-aem-archetype
5+
groupId=io.wcm.devops.conga.plugins.aem.it
6+
artifactId=io.wcm.devops.conga.plugins.aem.it.aemsample
7+
version=1.0.0-SNAPSHOT
8+
package=io.wcm.devops.conga.plugins.aem.it.aemsample
9+
packageGroupName=it
10+
aemAuthorPort=4502
11+
aemPublishPort=4503
12+
13+
# feature flags
14+
optionAemVersion=cloud
15+
optionJavaVersion=8
16+
optionAemServicePack=n
17+
optionSlingModelsLatest=n
18+
optionSlingInitialContentBundle=y
19+
optionEditableTemplates=y
20+
optionMultiBundleLayout=n
21+
optionContextAwareConfig=y
22+
optionFrontend=n
23+
optionNodeJsPlugin=n
24+
optionWcmioHandler=y
25+
optionAcsCommons=n
26+
optionIntegrationTests=n
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
# #%L
3+
# wcm.io
4+
# %%
5+
# Copyright (C) 2021 wcm.io
6+
# %%
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
# #L%
19+
20+
# Builds the application, deploys it to local author, and then deploys it to local publish as well (without building it again)
21+
# Deployment to author and publish runs in parallel
22+
23+
# Display a pause message (only when the script was executed via double-click on windows)
24+
pause_message() {
25+
if [ "$DISPLAY_PAUSE_MESSAGE_WRAPPER" = true ]; then
26+
echo ""
27+
read -n1 -r -p "Press any key to continue..."
28+
fi
29+
}
30+
31+
if [[ $0 == *":\\"* ]]; then
32+
DISPLAY_PAUSE_MESSAGE_WRAPPER=true
33+
fi
34+
35+
# Build application
36+
./build-deploy.sh build --maven.profiles=fast "$@"
37+
if [ "$?" -ne "0" ]; then
38+
pause_message
39+
exit $?
40+
fi
41+
42+
# Deploy to author (in parallel)
43+
./build-deploy.sh deploy --maven.profiles=fast --conga.node=aem-author "$@" &
44+
45+
# Deploy to publish (in parallel)
46+
./build-deploy.sh deploy --maven.profiles=fast,publish --conga.node=aem-publish "$@" &
47+
48+
wait
49+
pause_message
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
# #%L
3+
# wcm.io
4+
# %%
5+
# Copyright (C) 2017 - 2021 wcm.io
6+
# %%
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
# #L%
19+
20+
# Call with "help" parameter to display syntax information
21+
22+
MAVEN_PROFILES="fast,publish"
23+
CONGA_NODE="aem-publish"
24+
25+
if [[ $0 == *":\\"* ]]; then
26+
DISPLAY_PAUSE_MESSAGE=true
27+
fi
28+
29+
./build-deploy.sh --maven.profiles=${MAVEN_PROFILES} --conga.node=${CONGA_NODE} --display.pause.message=${DISPLAY_PAUSE_MESSAGE} "$@"

0 commit comments

Comments
 (0)