How to package and install content packages

Avatar

Avatar

Mayukh007

Avatar

Mayukh007

Mayukh007

26-08-2020

HI,

 

We are in process to migrate to Cloud Manager. We are using AEM 6.5.5.

Question: Can someone point me to a good documentation which shows step by step how to install content packages through our Code base (i guess by using ui.content..?).

So far we were installing content package zips manually through Package manager.

Also need to know how we can tell the build to install the content package in Auth and not in Publisher...

 

Note: To clarify my requirement, I have latest contents in Stage and I want to install them in Prod using Maven. So when Prod build/install process will run, it needs to install Stage contents specified by certain path/package name in Stage into Prod...Is that possible..?

View Entire Topic

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883
Arun_Patidar
MVP

26-08-2020

You can embed packages inside package in POM like 

https://github.com/adobe/aem-core-wcm-components/blob/3453838f52ab2ec2b5fe6052d7b1a9ab24404e3e/all/p...

 

AEM project pom uses profiles which can be used to deploy package only in Author. 

https://github.com/adobe/aem-core-wcm-components/blob/3453838f52ab2ec2b5fe6052d7b1a9ab24404e3e/all/p...

 

Mayukh007

Thank you for your suggestion Arun.

I have some doubts here:

1.  In the pom.xml file "<artifactId>core.wcm.components.core</artifactId>" this artifact id is name of the content package zip file..?

 

2.If I have content sitting in Stage env and I want to zip it up and install in Prod, how will this step work...?

Mayukh007

Hi Arun, I tried to add this plugin in my pom:

 

<plugin>

                    <groupId>com.day.jcr.vault</groupId>

                    <artifactId>content-package-maven-plugin</artifactId>

                    <version>0.0.24</version>

                    <extensions>true</extensions>

                    <configuration>

                        <failOnError>true</failOnError>

                        <userId>${crx.username}</userId>

                        <password>${crx.password}</password>

                        <subPackages>

                                <subPackage>

                                    <groupId>my_packages</groupId>

                                    <artifactId>manulife.aem.content</artifactId>

                                    <filter>true</filter>

                                </subPackage>

                            </subPackages>

                    </configuration>

                </plugin>      

 

I am getting error: 

[WARNING] No matching artifacts for Sub Packages: groupId=my_packages,artifactId=manulife.aem.content,filter=true,excludeTransitive=false

 

Can you please help me out here.

My target is to build the latest content in Stage and then install that in Prod assuming it will create a zip file with latest stage content with right filter and push it to artifactory. During Prod deployment it will pull it from artifactory and deploy those stage content in Prod.

I tried here by creating a content package in my local under group "my_packages" and the package name is "manulife.aem.content" with version 1.0. I am assuming it will rebuild the already uploaded package and then generate a zip file with content package which I can use in higher env..?