3

I'm having troubles updating my bundle from the gogo shell. I have a gogo shell running on terminal. My bundles are active in there.

Now when I make changes to the code, what steps are necessary to forward these changes into the running OSGi framework?

I ran update <bundleId> but nothing happens. It still runs the same version which was compiled when I started the framework. Before the update command I opened another terminal and ran mvn clean install (I'm using maven-bundle-plugin along with pax-construct).

megamoth
  • 695
  • 2
  • 12
  • 27
hooch
  • 1,135
  • 1
  • 16
  • 31
  • Is the OSGi Framework running on your computer or do you have a remote connection with your terminal? – FrVaBe Jul 21 '11 at 06:52

2 Answers2

2

When working with Maven, my workflow for checking updated code involves two terminals.

  • After updating the code, I run mvn install from the project which will build the actual bundle. Keep track of the absolute location on your system where the target bundle is built.
  • In the running framework, I update the bundle, giving it a URL; something like update 25 file:///Users/you/project/bundle/target/bundle.jar

If you're free not to use Maven and Pax Runner, you can also take a look at bndtools, which is an Eclipse plugin. You can then still take the bundles that bndtools builds for you, and run them with Pax Runner.

Angelo van der Sijpt
  • 3,611
  • 18
  • 24
  • Thanks a lot! The absolute classpath did it. I tried with relative before but got an I/O exception. (or maybe I mispelled it..) – hooch Jul 21 '11 at 09:57
0

Another try is via OBR local repo as follows:
- assume artifact is called test-api, then
a)g! deploy test-api deployed under id: 25
after further changes made to the code and mvn clean install do:
1)g! update 25
2)g! refresh
if no result then before step 1) try g! repos refresh file:///c:/Users/.m2/repository.xml to refresh local OBR repo