Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Best way to update core components

Avatar

Level 7

Hi Team,

 

What is the best way to update core components .. Is  that through POM ? if so please guide me by showing pom changes .. If not through packMgr can we upload the package if so what is the exact folder I need to upload from below 

JakeCham_0-1703159119984.png

Thanks 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @JakeCham,

 

Kindle refer to the below steps to embed core components if it's first time in your project.

1. Add dependencies to parent pom xml

<dependencyManagement>
  <dependencies>
    ...
    <dependency>
      <groupId>com.adobe.cq</groupId>
      <artifactId>core.wcm.components.all</artifactId>
      <type>zip</type>
      <version>2.20.0</version>
    </dependency>
  </dependencies>
</dependencyManagement>

2. Add dependencies to your target maven module.

In this example, we will target all/pom.xml

<dependencies>
    ...
    <dependency>
        <groupId>com.adobe.cq</groupId>
        <artifactId>core.wcm.components.core</artifactId>
        <scope>provided</scope>
    </dependency>
</dependencies>

3. Configure com.day.jcr.vault’s <subPackages><subPackage> to target maven module

In this example, we will target all/pom.xml

<plugin>
    <groupId>com.day.jcr.vault</groupId>
    <artifactId>content-package-maven-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
        ...
        <subPackages>
            <subPackage>
                <groupId>com.adobe.cq</groupId>
                <artifactId>core.wcm.components.all</artifactId>
                <filter>true</filter>
            </subPackage>
        </subPackages>
        <targetURL>http://${crx.host}:${crx.port}/crx/packmgr/service.jsp</targetURL>
    </configuration>
</plugin>

 

When you said to update, presumably it should be already in your project's pom in this case, find out the pom's as mentioned above and update to the latest version of core components as per need: https://github.com/adobe/aem-core-wcm-components/releases

 

Hope that helps!

Regards,

Santosh

View solution in original post

8 Replies

Avatar

Community Advisor

Hi @JakeCham 
Yes, it is recommned to not deploy anything manually in AEM.

 

Core components can be updated/install through POM. example : https://github.com/arunpatidar02/com.aemlab.junitapp/blob/6303332e9e02e78c9ecdedcac6c01b6ebc6192a6/a... 



Arun Patidar

Avatar

Level 7

Hi @arunpatidar Thank you for replying! 

 

1. Should it be added inside org.apache.jackrabbit plugin ?
2. embedding below would be enough to download and build the latest core package ?

 <embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.content</artifactId>
<type>zip</type>
<target>/apps/JunitApp-vendor-packages/application/install</target>
</embedded>

Avatar

Community Advisor

embedding below would be enough to download and build the latest core package, make sure you have dependencies added in the dependency section.

 

You can check the reference project's POM which I have shared.



Arun Patidar

Avatar

Level 7

Hi @arunpatidar 
I have added below, But core component doesn't get updated. Build is success though. Please guide 

 <plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<group>JunitApp</group>
<embeddeds>
<embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.content</artifactId>
<type>zip</type>
<target>/apps/JunitApp-vendor-packages/application/install</target>
</embedded>
</embeddeds>
</configuration>
</plugin>

<dependencies>

<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.content</artifactId>
<type>zip</type>
</dependency>

</dependencies>

 

Avatar

Community Advisor

@JakeCham 
Could you please check what dou you have inside /apps/JunitApp-vendor-packages/application/install?
You might have missed the filter changes

https://github.com/arunpatidar02/com.aemlab.junitapp/blob/6303332e9e02e78c9ecdedcac6c01b6ebc6192a6/a... 



Arun Patidar

Avatar

Level 7

Hi @arunpatidar 

I have added /apps/JunitApp-vendor-packages/application/install these folder structure inside apps and added filter.xml as you mentioned above still core component is not getting updating ..

 

Avatar

Community Advisor

Hi @JakeCham 
Can you try deploying https://github.com/arunpatidar02/com.aemlab.junitapp ?

This project has core version 2.7.0 but you can try update in POM before you do installation ?

Please try "mvn clean install -PautoInstallPackage" command



Arun Patidar

Avatar

Correct answer by
Community Advisor

Hi @JakeCham,

 

Kindle refer to the below steps to embed core components if it's first time in your project.

1. Add dependencies to parent pom xml

<dependencyManagement>
  <dependencies>
    ...
    <dependency>
      <groupId>com.adobe.cq</groupId>
      <artifactId>core.wcm.components.all</artifactId>
      <type>zip</type>
      <version>2.20.0</version>
    </dependency>
  </dependencies>
</dependencyManagement>

2. Add dependencies to your target maven module.

In this example, we will target all/pom.xml

<dependencies>
    ...
    <dependency>
        <groupId>com.adobe.cq</groupId>
        <artifactId>core.wcm.components.core</artifactId>
        <scope>provided</scope>
    </dependency>
</dependencies>

3. Configure com.day.jcr.vault’s <subPackages><subPackage> to target maven module

In this example, we will target all/pom.xml

<plugin>
    <groupId>com.day.jcr.vault</groupId>
    <artifactId>content-package-maven-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
        ...
        <subPackages>
            <subPackage>
                <groupId>com.adobe.cq</groupId>
                <artifactId>core.wcm.components.all</artifactId>
                <filter>true</filter>
            </subPackage>
        </subPackages>
        <targetURL>http://${crx.host}:${crx.port}/crx/packmgr/service.jsp</targetURL>
    </configuration>
</plugin>

 

When you said to update, presumably it should be already in your project's pom in this case, find out the pom's as mentioned above and update to the latest version of core components as per need: https://github.com/adobe/aem-core-wcm-components/releases

 

Hope that helps!

Regards,

Santosh