Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

how to migrate maven-bundle-plugin to bnd-maven-plugin for AEMaaCS????

Avatar

Level 4
Existing cor/pom.xml  

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>!org.xhtmlrenderer.pdf.*;!org.apache.jcp.xml.dsig.internal.dom.*;!org.apache.xml.security.utils.*;!com.itextpdf.*;!org.bouncycastle.*;!twitter4j.*;!com.lowagie.*;!com.apple.mrj.*;!com.itextpdf.*;javax.inject;version=0.0.0,*</Import-Package>
<Sling-Model-Packages>
do.max.core.aem
</Sling-Model-Packages>
<Embed-Transitive>true</Embed-Transitive>
<Embed-Dependency>*;groupId=com.maxmind.geoip2|com.itextpdf|com.lowagie|com.fasterxml.jackson.core|com.maxmind.db|org.xhtmlrenderer|com.atlassian.commonmark;scope=compile|runtime;type=!pom;
inline=false,jsoup</Embed-Dependency>
</instructions>
</configuration>
</plugin>

Need to migrate to bnd-maven-plugin(biz.aQute.bnd)

<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
Export-Package: do.max.core.aem.*,\
Import-Package: javax.annotation;version=0.0.0,*
Sling-Model-Packages: do.max.core.aem
Bundle-DocURL:
-plugin org.apache.sling.caconfig.bndplugin.ConfigurationClassScannerPlugin
-plugin org.apache.sling.bnd.models.ModelsScannerPlugin
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>

I have tried the solution from all the old thread still not resolved yet.

could you please guide anyone as i'm facing issue from long time????

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
6 Replies

Avatar

Correct answer by
Community Advisor

Hi @vkarthick 
You can check sample plugin here, let me know if anything specific is not working for you

https://github.com/arunpatidar02/aemaacs-aemlab/blob/f96ce5316dfa4798c72d2e87d3a0b41fc49791a4/pom.xm... 

 

 

Bnd-maven-plugin : https://github.com/bndtools/bnd/blob/master/maven-plugins/bnd-maven-plugin/README.md 



Arun Patidar

Avatar

Community Advisor

Hello @vkarthick 

 

Please refer to this PR of ACS commons, where a similar transition was done

https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/2761

 

It will help you understand the changes needed.

 

Another Article is: https://wcm-io.atlassian.net/wiki/spaces/WCMIO/pages/1267040260/How+to+switch+from+maven-bundle-plug...

 

Hope it helps !


Aanchal Sikka

Avatar

Administrator

@vkarthick Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni