Search code examples
adobeaem

Can we exclude core components when we use the Maven archetype to create a new repo?


We have AEM env in 6.4.2, and we want to include new repo(adding new website in multi-tenancy env). For this, I am using maven archetype 20 to create a new repo. We already have core components(2.5.0) are available in AEM instance, so I would like to exclude dependency from the newly created repo. Is there any way we can exclude core components creation from the latest archetypes?


Solution

  • From what I can see in the AEM Project Archetype pom file https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/all/pom.xml#L73 AEM core components will be set up as embedded unless you specify your AEM version as "cloud"

    Excluding the package from your build once the project is created is quite straightforward though, simply remove the embedded tag from your project's pom file and adjust your <core.wcm.components.version> property to depend on 2.5.0