Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM maven build core bundle size issue

ABid2
Level 1
Level 1

I have 2 AEM projects Project A and Project B.

I have added a dependency of Project A into Project B pom files. But while doing so I observe that the bundle size of Project B increases. I see that the jar of Project A is being embedded into Project B bundle. Could you guys please suggest?

Project A and B, both are deployed in the same AEM environment.

 

Parent POM of Project B with dependency of Project A:

<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>project-a-core</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

 

Core POM of Project B with dependencies of Project A:

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- <Embed-Dependency> artifactId1, artifactId2;inline=true </Embed-Dependency> -->
<Import-Package>
!com.ibm.*,
!com.sun.*,
!sun.*,
!javax.jmdns.*,
!javax.jms.*,
!jline.*,
!org.jboss.netty.*,
!org.relaxng.datatype.*,
com.project.a.service,
com.project.a.model,
*
</Import-Package>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Embed-Directory>OSGI-INF/lib</Embed-Directory>
<Embed-Transitive>false</Embed-Transitive>
</instructions>
</configuration>
</plugin>

..

..

..

<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>project-a-core</artifactId>
</dependency>

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

Typically you deploy content packages (zip files) to AEM, which contain these bundles. Normally a project produces a single content package, which can contain out of multiple nested content packages (depending on the version of the archetype you are using).

 

Now you can drill into project B and check where the project A's JAR is embedded. Then check the pom.xml file of the corresponding maven project for the content-package-maven-plugin or the filevault-maven-plugin and check it's configuration if it embeeds the A.jar.

View solution in original post

1 Reply
Jörg_Hoh
Correct answer by
Employee
Employee

Typically you deploy content packages (zip files) to AEM, which contain these bundles. Normally a project produces a single content package, which can contain out of multiple nested content packages (depending on the version of the archetype you are using).

 

Now you can drill into project B and check where the project A's JAR is embedded. Then check the pom.xml file of the corresponding maven project for the content-package-maven-plugin or the filevault-maven-plugin and check it's configuration if it embeeds the A.jar.

View solution in original post