Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8226149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:39:54+00:00 2026-06-07T15:39:54+00:00

As far as I’ve read, the dev:watch command of apache karaf should help developing

  • 0

As far as I’ve read, the dev:watch command of apache karaf should help developing osgi bundles in such way that I don’t have to manually update a bundle everytime I make changes to the sourcecode of that bundle.

I tried this, with one simple bundle which only consists of a Activator class.
I am using maven for development.

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class Activator implements BundleActivator {

public void start(BundleContext context) {
    System.out.println("Starting the bundle");
}

public void stop(BundleContext context) {
    System.out.println("Stopping the bundle");
}
}

I installed the bundle using the karaf command:

osgi:install mvn:my.groupId/my.artifactId

then I started the bundle using osgi:start <id of my bundle>

then I started monitoring for this bundle using dev:watch --start <id of my bundle>

Karaf tells me that it monitors my bundle.

Then I wanted to test if the bundle will be updated automatically if I make changes to the source code and rebuild my bundle.
So I changed the System.out.println()'s of the activator class and built my rebuild my bundle using mvn clean install.

Shouldn’t the bundle updates itself now? When I take a look at the karaf console I see no changes until I update the bundle manually using osgi:update (which I want to avoid, using dev:watch) …

What am I doing wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:39:56+00:00Added an answer on June 7, 2026 at 3:39 pm

    After some hours I found the source of error.
    Even if the bundle is already a SNAPSHOT version, it is not sufficient to install the bundle using osgi:install mvn:<groupID>/<artifactID> but you have to use the <version> too in the bundle URL: osgi:install mvn:<groupID>/<artifactID>/<version> ,where <version> corresponds to the version tag specified in the pom.xml. It has to be a snapshot version like “1.0-SNAPSHOT”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As far as I know there is no way to migrate existing Facebook comments
So far, the bundles I've used for Symfony2 has been installed modifying the deps
As far as I remember, a role instance should automatically perform a restart after
As far as variable naming conventions go, should iterators be named i or something
As far as I've gathered (read: measured), building the configuration and the sessionfactory by
So far as I understand you should not pass simple types by reference in
As far as I understand it, there is no way in Scala to have
Far as best practices are concerned, which is better: public void SomeMethod(string str) {
as far as I know both 2012-07-04T17:30:52+00:00 and 2012-07-04T17:30:52Z are dates in iso8601 format
As far as i remember while installing ubuntu,the installer didn't ask me for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.