How Apache Felix Maven Bundle Plugin (BND) works in AEM ? | Community
Skip to main content
PunitMuddebihal
June 16, 2024
Solved

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

  • June 16, 2024
  • 1 reply
  • 1832 views

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 ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by abhishekanand_

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

1 reply

abhishekanand_
Community Advisor
abhishekanand_Community AdvisorAccepted solution
Community Advisor
June 17, 2024

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

Abhishek Anand
PunitMuddebihal
June 17, 2024

Thanks a lot for detailed explanation.