Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

How Apache Felix Maven Bundle Plugin (BND) works in AEM ?

Avatar

Level 1

What does 'Apache Felix Maven Bundle Plugin (BND)' do at the background when we build a AEM application ? Could someone please explain step by step process ?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @PunitMuddebihal 

Analyzes your code and dependencies.
Generates the manifest file with detailed instructions.
Ensures all necessary libraries and resources are included.

The Maven Bundle Plugin is based on the BND tool and integrates with Maven to create OSGi bundles. It treats the project as a collection of classes and allows specifying which classes to include in the bundle’s JAR file.

BND instructions are specified in the POM file to direct the plugin’s behavior, such as Export-Package for exporting packages, Private-Package for non-exported packages, and Include-Resource for including additional resources.

Dependency groupId and artifactID
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>

biz.aQute.bnd (bnd-maven-plugin) is a more recent project actively maintained by aQute Software.
org.apache.felix(maven-bundle-plugin) is the original plugin developed by the Apache Software Foundation. While still functional, it's not actively maintained anymore.
Newer AEM project archetypes typically recommend using bnd-maven-plugin

you can also check out the below attached reference for more details on this:
Apache Felix Maven Bundle Plugin (BND) :: Apache Felix

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

Hi @PunitMuddebihal 

Analyzes your code and dependencies.
Generates the manifest file with detailed instructions.
Ensures all necessary libraries and resources are included.

The Maven Bundle Plugin is based on the BND tool and integrates with Maven to create OSGi bundles. It treats the project as a collection of classes and allows specifying which classes to include in the bundle’s JAR file.

BND instructions are specified in the POM file to direct the plugin’s behavior, such as Export-Package for exporting packages, Private-Package for non-exported packages, and Include-Resource for including additional resources.

Dependency groupId and artifactID
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>

biz.aQute.bnd (bnd-maven-plugin) is a more recent project actively maintained by aQute Software.
org.apache.felix(maven-bundle-plugin) is the original plugin developed by the Apache Software Foundation. While still functional, it's not actively maintained anymore.
Newer AEM project archetypes typically recommend using bnd-maven-plugin

you can also check out the below attached reference for more details on this:
Apache Felix Maven Bundle Plugin (BND) :: Apache Felix