0

When I attempt to update my OSGI bundle after making changes to the source code within my project, none of the changes are seen after the update only when I specify multiple export packages in my pom.xml. There are no errors produced when running the update.

My project has two packages in it

  • com.comp.package.a
  • com.comp.package.b

When I specify only one export package in my pom.xml <Export-Package>com.comp.package.a</Export-Package>, any changes I make to the source code are successfully included in the bundle after running an update. However, when I add a second package to the export <Export-Package>com.comp.package.a, com.comp.package.b</Export-Package>, no changes I make to the source code are seen after running an update.

Can anyone explain what is going on here?

Note: changes that are made in my pom.xml are always being included after the update is run, it is only changes to the source code that are not picked up. For example, if I add/subtract packages from the <Export-Package>, those changes are picked up.

McLovin
  • 1,455
  • 3
  • 19
  • 37

2 Answers2

0

See Peter Kriens' answer to How does OSGi bundle update work?.

Long story short: "after an install or update you should ALWAYS do a refresh".

Community
  • 1
  • 1
Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
  • Thank you for your answer. I understand fundamentally how the OSGi update works. Having multiple packages exported does not explain any dependency related issues explicitly to me so there is something that I am missing. – McLovin Jun 03 '15 at 21:03
0

Try this:

<Export-Package>com.comp.package.a,com.comp.package.b</Export-Package>

Do not put space between the packages.

Check out this:

http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html -> Instructions -> <Export-Package>

jkdev
  • 11,360
  • 15
  • 54
  • 77