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>