Update AEM Archetype using Repository Modernizer
Published
- Install Adobe I/O CLI:
npm install -g @adobe/aio-cli
- Install AEM Cloud Service Migration Plugin:
aio plugins:install @adobe/aio-cli-plugin-aem-cloud-service-migration
aio aem-migration:repository-modernizer
command. You'll need to create an aem-migration-config.yaml file, which can be stored either in your local file system or within the CLI configuration directory.- Local Project Location:
./.aio-cli
- CLI Config Directory:
~/.config/@adobe/aio-cli
aem-migration-config.yaml
repositoryModernizer:
# groupId to be used for newly created packages
groupId: com.aem.demo
# information about parent pom
parentPom:
# absolute path to the parent pom file
path: /Users/XXXX/github/aem-demo/pom.xml
# the artifactId to be set for the parent pom
artifactId: aem-demo
# the application title to be set for the parent pom
appTitle: AEM Demo
# version to be to be set for the parent pom
version: 4.7.9-SNAPSHOT
# information required for all and analyse packages
all:
# prefix that is to be used to set the artifactId for all and analyse packages
artifactId: aem-demo
# application title
appTitle: AEM Demo
# version to be set for all pom
version: 4.7.9-SNAPSHOT
# information about projects (expects an array of project information)
# NOTE : For multiple projects create separate copies of the info section for each project
projects:
- # absolute path to the XYZ project folder
projectPath: /Users/XXXX/github/aem-demo
# Array of relative path(s) (w.r.t. the project folder) to the existing content package(s) that needs to be restructured.
# NOTE : only content packages are expected here, NOT bundle/jar artifacts
existingContentPackageFolder:
- /ui.apps
# relative path (w.r.t. the existing content package folder) to the filter.xml file
# (If not specified, default path `/src/main/content/META-INF/vault/filter.xml` will be used.)
relativePathToExistingFilterXml:
# relative path (w.r.t. the existing content package folder) to the jcr_root directory
# (If not specified, default path `/src/main/content/jcr_root` will be used)
relativePathToExistingJcrRoot:
# prefix that is to be used to set the artifactId for newly created ui.apps and ui.content packages
artifactId: aem-demo
# application title
appTitle: AEM Demo
# application ID (will be used for config and package folder names)
appId: aem-demo
# project specific version to be used for content packages
version: 4.7.9-SNAPSHOT
# Array of relative path(s) (w.r.t. the project folder) to the existing code bundles (will be embedded in the all package).
coreBundles:
- /core
- /common.core
# OSGi config folders that need to be renamed.
# The existing/source OSGi config folder PATH (JCR path starting from '/apps') is expected as key
# and the replacement OSGi folder NAME is expected as value. See examples below :
# /apps/xyz/config.prod : config.publish.prod
# /apps/system/config.author.dev1 : config.author.dev
# /apps/system/config.author.dev2 : config.author.dev
# NOTE :
# 1. All OSGi config folders under the same path and with same replacement name will be MERGED
# (as configured in above example).
# 2. If there exists OSGi config files with the same pid/filename in more than one config folders
# which are to be merged, they will not be overwritten. A warning regrading the same will be
# generated in the summary report and result log file. User would need to manually evaluate
# which config to persist
osgiFoldersToRename:
/apps/aem-demo/configs/config.publish: config.publish.prod
target
folder for refactored code, updated configurations, a summary report, and the tool's execution logs.- Missing version info in core bundles will be reported; the version will also need to be added in the dependency section in the
all/pom.xml
. - Ensure that you add the Gson dependency before the AEM SDK API; otherwise, you might encounter
java.lang.NoSuchMethodError
during the testing phase. - The Core dependency is missing in the
ui.apps/pom.xml
; it needs to be added to the dependencies section.