Expand my Community achievements bar.

SOLVED

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

Avatar

Level 3

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

Avatar

Correct answer by
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

Avatar

Level 4

Hi,

Yes you can do that -

Please remove core component dependency from your pom.xml

Avatar

Correct answer by
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>