Can we exclude core components when we use the Maven archetype to create a new repo? | Community
Skip to main content
Level 3
May 29, 2020
Solved

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

  • May 29, 2020
  • 2 replies
  • 4057 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by BrianKasingli

@ramaem12,

Sure, its very simple, in the ui.apps maven module, remove the <groupId>com.adobe.cq</groupId> subpackages.
AEM Archetype 20 ui.apps - https://github.com/adobe/aem-project-archetype/blob/aem-project-archetype-20/src/main/archetype/ui.apps/pom.xml

When core.wcm.components is no longer needed, be sure to also remove this from your parent pom.xml

 

<!-- ====================================================================== --> <!-- V A U L T P A C K A G E P L U G I N S --> <!-- ====================================================================== --> <plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <group>${packageGroup}</group> <embeddeds> <embedded> <groupId>${groupId}</groupId> <artifactId>${rootArtifactId}.core</artifactId> <target>/apps/${appsFolderName}/install</target> </embedded> </embeddeds> <subPackages> <!-- REMOVE ME ---!> <subPackage> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <filter>true</filter> </subPackage> <!-- REMOVE ME ---!> <subPackage> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.examples</artifactId> <filter>true</filter> </subPackage> </subPackages> </configuration> </plugin> <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <verbose>true</verbose> <failOnError>true</failOnError> </configuration> </plugin> <plugin> <groupId>org.apache.sling</groupId> <artifactId>htl-maven-plugin</artifactId> </plugin> </plugins>

 

 

2 replies

Level 4
May 29, 2020

Hi,

Yes you can do that -

Please remove core component dependency from your pom.xml

BrianKasingli
Community Advisor and Adobe Champion
BrianKasingliCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
May 29, 2020

@ramaem12,

Sure, its very simple, in the ui.apps maven module, remove the <groupId>com.adobe.cq</groupId> subpackages.
AEM Archetype 20 ui.apps - https://github.com/adobe/aem-project-archetype/blob/aem-project-archetype-20/src/main/archetype/ui.apps/pom.xml

When core.wcm.components is no longer needed, be sure to also remove this from your parent pom.xml

 

<!-- ====================================================================== --> <!-- V A U L T P A C K A G E P L U G I N S --> <!-- ====================================================================== --> <plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <group>${packageGroup}</group> <embeddeds> <embedded> <groupId>${groupId}</groupId> <artifactId>${rootArtifactId}.core</artifactId> <target>/apps/${appsFolderName}/install</target> </embedded> </embeddeds> <subPackages> <!-- REMOVE ME ---!> <subPackage> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <filter>true</filter> </subPackage> <!-- REMOVE ME ---!> <subPackage> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.examples</artifactId> <filter>true</filter> </subPackage> </subPackages> </configuration> </plugin> <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <verbose>true</verbose> <failOnError>true</failOnError> </configuration> </plugin> <plugin> <groupId>org.apache.sling</groupId> <artifactId>htl-maven-plugin</artifactId> </plugin> </plugins>