maven-bundle-plugin not working as expected in AEM 6.5 | Community
Skip to main content
nikunjj81682294
Level 2
August 14, 2019

maven-bundle-plugin not working as expected in AEM 6.5

  • August 14, 2019
  • 1 reply
  • 2909 views

<plugin>
      <groupId>org.apache.felix</groupId>
      <artifactId>maven-bundle-plugin</artifactId>
      <version></version>
      <extensions>true</extensions>
      <configuration>
        <instructions>
          <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
          <Bundle-Version>${project.version}</Bundle-Version>
          <Bundle-Name>${bundle.name}</Bundle-Name>
          <Export-Package>${bundle.namespace}</Export-Package>
          <Bundle-Activator>Activator.class</Bundle-Activator>

         <Embed-Dependency>*;scope=!provided|test;groupId=!org.mybundle.test</Embed-Dependency>

          <Embed-Transitive>true</Embed-Transitive>
          <Import-Package>*;resolution:=optional</Import-Package>
        </instructions>
      </configuration>
    </plugin>

The above code works fine in AEM 6.2 when I try to embed an external jar file. It looks like the above plugin is not working as expected in AEM 6.5.

Can someone provide an answer on what needs to be done to embed an external jar file in AEM 6.5?

Thanks,

Nikunj Jariwala

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

1 reply

Adobe Employee
August 15, 2019

Similar questions have been answered at [1] and [2]

Also, do you observe any error when running maven build?

[1] how to embed dependent jar ? how to embed dependent jar ?

[2] Embedding third party jar into bundle

nikunjj81682294
Level 2
August 15, 2019

JaideepBrar​, Thanks for responding.

The referenced links describe how to convert a regular jar into an OSGi jar. Although this option works it involves doing things manually as opposed to relying on maven to do the conversion.

The maven-bundle-plugin does the conversion for you. It looks like it has been replaced by bnd-maven-plugin.

Do u know if bnd-maven-plugin is capable of doing the conversion from regular jar to OSGI? or Are we going back to doing things manually where you have to convert the jar to OSGI jar instead of relying on Maven to do it for you?

Thanks,

Nikunj Jariwala