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

How to Include 3rd party aem package for AEM cloud

Avatar

Level 9

I have an installable AEM package(external-app-1.0.7.zip) and I am able to  install this in my local AEM by uploading it in the package manager. In cloud I can not install as it contains /app/mypackage since it is an un-mutable AEM cloud instance and could not install the package through package manager. Hence I am planning to keep the external-app-1.0.7.zip in the resource folder like ...all/src/main/resources/external-app-1.0.7.zip as part of the codebase itself. I am planning to use the <embedded> feature to embed this package. 

 

<embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>lorum</artifactId>
<type>zip</type>
<target>/apps/mypro/application/install</target>
</embedded>
 
But I don't have artifact and groupid for this package. Is there any way I can install external-app-1.0.7.zip as part of maven deployment 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Mario248 

 

Glad that it had helped you a bit.

 

Have you tried local repo as well?

 

Once you have the details, please refer to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/including-3rd-party-aem-pa...

It explains how to use Local filesystem repo to deploy packages that are not public

 
 

Aanchal Sikka

View solution in original post

10 Replies

Avatar

Community Advisor

Hello @Mario248 

 

We can get the artifactID and groupID by unzipping the package.

  • Unzip the package
  • Go to \META-INF\maven folder
    • Follow the folder structure underneath it until you reach pom.xml
      • First folder is groupID
      • Second is artifactID
    • Or just reach pom.xml and all information is in there

 

Example: acs-aem-commons-all-6.0.14\META-INF\maven\com.adobe.acs\acs-aem-commons-all

 

 

aanchalsikka_0-1694179476462.png

 

You should be able to use the recommended <embedded> way

 

Once you have the details, please refer to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/including-3rd-party-aem-pa...

It explains how to use Local filesystem repo to deploy packages that are not public


Aanchal Sikka

Avatar

Level 9

Thank you for your input. I got the artifactID and groupID by using your steps. I have prepared below embed and deployed the code into my local, the build is success but I dont see package in /apps/myproject/application/install in crxde.

 

 

 

 

 

<embedded>
<groupId>com.green.grass</groupId>
<artifactId>com.green.grass.digital</artifactId>
<type>zip</type>
<target>/apps/myproject/application/install</target>
</embedded>

 

 

 

 
I have kept the zip in resource folder( ...all/src/main/resources/external-app-1.0.7.zip ). Can you tell me where do I specify location of the zip file ?

Avatar

Correct answer by
Community Advisor

Hello @Mario248 

 

Glad that it had helped you a bit.

 

Have you tried local repo as well?

 

Once you have the details, please refer to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/including-3rd-party-aem-pa...

It explains how to use Local filesystem repo to deploy packages that are not public

 
 

Aanchal Sikka

Avatar

Level 9

Thank you for providing the references. I followed above doc and executed the steps,

 

Step 1-
Executed below command inside main pom location.

 

 

mvn install:install-file \
-Dfile=/xxx/aem-green-grass.ui.content-1.0.7.zip \
-DgroupId=com.green.grass \
-DartifactId=com.green.grass.digital \
-Dversion=1.0.7 \
-Dpackaging=zip \
-DlocalRepositoryPath=/xxx/repository

 

 

 

Step 2-
main pom.xml

 

 

<repository>
<id>project.local</id>
<name>project</name>
<url>file://${project.basedir}/repository</url>
</repository>

 

 

 

Step 3-
all module pom.xml

 

 

<embedded>
<groupId>com.green.grass</groupId>
<artifactId>com.green.grass.digital</artifactId>
<type>zip</type>
<target>/apps/myproj/application/install</target>
</embedded>

 

 

 

all module pom.xml

 

 

<dependency>
<groupId>com.green.grass</groupId>
<artifactId>com.green.grass.digital</artifactId>
<type>zip</type>
</dependency>

 

 

But this dependency is not getting resolved. Should I use my parent group ID in step 1? please guide me. Cc  @Vijayalakshmi_S 

Avatar

Level 9

I found something interesting in the maven build log. It is trying to download the zip file in different locations. I am not sure why it is  "file://${project.basedir}/repository"  going to the "all" module instead of the parent pom location.

It should be like,

file:///Users/xxx/repository/com/adobe/aem/green/grass-1.0.7/com.green.grass.digital-1.0.7.pom
1.0.7.pom
 
But it is trying to download,
file:///Users/xxx/all/repository/com/adobe/aem/green/grass-1.0.7/com.green.grass.digital-1.0.7.pom

 

 

Downloading from project.local: file:///Users/xxx/all/repository/com/adobe/aem/green/grass-1.0.7/com.green.grass.digital-1.0.7.pom
[WARNING] The POM for com.green.grass.digital:zip:1.0.7 is missing, no dependency information available

 

Avatar

Community Advisor

Please take a look at this article: https://www.albinsblog.com/2015/06/deploying-bundlespackages-to-different-env-maven-adobecq5-adobeae... where It shows how to use the "content-package-maven-plugin" plugin. By specifying the packageFile property I think you should be able to achieve what you need. 

Reference:
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/develo... 



Esteban Bustamante

Avatar

Community Advisor

Hi @Mario248 ,

Please follow below steps

steps to include a third-party package in AEM as a Cloud Service:

  1. Check the Adobe Experience Manager as a Cloud Service - Supported Integrations documentation to ensure that the third-party package you want to include is supported in the cloud environment. Adobe maintains a list of supported integrations and packages that are tested and verified to work with AEM as a Cloud Service.

  2. Create a Maven project for your custom code and dependencies. Use Maven as the build tool to manage your project's dependencies and package them into an AEM package.

  3. Add the third-party package as a dependency in your Maven project's pom.xml file. Specify the appropriate version of the package that is compatible with AEM as a Cloud Service.

  4. Build your Maven project to generate an AEM package that includes your custom code and the third-party package as dependencies.

  5. Deploy the AEM package to your AEM as a Cloud Service instance using the Cloud Manager or the Package Manager in AEM. Follow the recommended deployment practices provided by Adobe for AEM as a Cloud Service.

  6. Test your custom code and the integration with the third-party package in the AEM as a Cloud Service environment.

Avatar

Administrator

@Mario248 Do you find the suggestions from users useful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. 

 



Kautuk Sahni

Avatar

Community Advisor

Sharing a blog which explains how to use Third-party bundles when:

  • Hosted in restricted Maven repo 
  • Local repo (i.e. when maven repositories cannot be used)

 

https://techrevel.blog/2023/09/27/managing-third-party-dependencies-in-aem/

 

It also explains the configurations needed to deploy via cloud manager


Aanchal Sikka