Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

ramaem12
Level 2
Level 2

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.

1 Accepted Solution
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@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.a...

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>

 

 

View solution in original post

2 Replies
ankurk67503819
Level 4
Level 4

Hi,

Yes you can do that -

Please remove core component dependency from your pom.xml

BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@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.a...

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>

 

 

View solution in original post