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

Adding custom bundle and install

Avatar

Level 4

Hello Community - I have made some minor changes to Sling Dynamic Include jar and kept the custom SDI bundle under "/apps/project/install" folder and also added the below dependency. If I run a build, I could only see the SDI jar included in the install folder not the custom SDI bundle which I have added in the install folder. is there a way to only include & install my custom bundle not the actual SDI bundle? Please advise.

Added this dependency in core and parent POM:

<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.dynamic-include</artifactId>
<version>3.1.2</version>
</dependency>

 

ui.apps POM:
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>0.0.24</version>
<extensions>true</extensions>
<configuration>
<group>com.test.company.aem</group>

. . . . .
<embeddeds>
<!-- Sling dynamic include -->
<embedded>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.dynamic-include</artifactId>
<target>/apps/project/install</target>
</embedded>
</embeddeds>
<properties>
<acHandling>Merge</acHandling>
</properties>
<targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
</configuration>
</plugin>

 

@VeenaVikraman

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @aemninja 

 

Embedding the JAR will download the package from the groupId with the artifactId and will install on all target AEM instance. It will not pick from the local folder.

 

There are 2 ways you can install the custom jar:

  1. Either upload the custom jar to some external repo such as nexus or make it available as an external jar with different groupId and artifactId and then include those in POM under embedd section to to deply it along with build like any other external jar.
  2. Or manually install the custom jar on all AEM instances.

 

Thanks!

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi @aemninja 

 

Embedding the JAR will download the package from the groupId with the artifactId and will install on all target AEM instance. It will not pick from the local folder.

 

There are 2 ways you can install the custom jar:

  1. Either upload the custom jar to some external repo such as nexus or make it available as an external jar with different groupId and artifactId and then include those in POM under embedd section to to deply it along with build like any other external jar.
  2. Or manually install the custom jar on all AEM instances.

 

Thanks!

Avatar

Level 4
@Asutosh_Jena_ - Thanks for your inputs. For manual install on Prod publish instances, the felix console access is restricted. is there a way to install them on all instances without going to "system/console/bundles"

Avatar

Community Advisor

@aemninja Your administrator should have access to system/console/bundles and you should be able to perform this one time action. Other approach can be to put the jar into "crx-quickstart/repository/install" folder where AEM is installed and restart the instance which will install the bundle on AEM.

 

See the below link for more info:

https://helpx.adobe.com/in/experience-manager/kb/HowToInstallPackagesUsingRepositoryInstall.html

 

Thanks!

Avatar

Level 4
@Asutosh_Jena_ - How about specifying the custom bundle using the below dependency ? <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.dynamic-include</artifactId> <version>3.1.2</version> <scope>system</scope> <systemPath>${project.basedir}/../repo/thirdparty.jar</systemPath> </dependency>

Avatar

Community Advisor
As you mentioned it;s a customized jar, I believe the best option will be for you to upload into a repository and use it as an embedd option. The reason is, if we follow this approach, the jar will be automatically downloaded and installed on any AEM instance where it is not available as part of the build. But if we go with the manuall approach, you will need to pass the jar to each n every individual developer when they start working on the project as without the custom jar the bundle will not be able to start.