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 770675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:32:08+00:00 2026-05-14T18:32:08+00:00

I’m using OSGi for my latest project at work, and it’s pretty beautiful as

  • 0

I’m using OSGi for my latest project at work, and it’s pretty beautiful as far as modularity and functionality.

But I’m not happy with the development workflow. Eventually, I plan to have 30-50 separate bundles, arranged in a dependency graph – supposedly, this is what OSGi is designed for. But I can’t figure out a clean way to manage dependencies at compile time.

Example: You have bundles A and B. B depends on packages defined in A. Each bundle is developed as a separate Java project.

In order to compile B, A has to be on the javac classpath.

Do you:

  1. Reference the file system location of project A in B’s build script?
  2. Build A and throw the jar into B’s lib directory?
  3. Rely on Eclipse’s “referenced projects” feature and always use Eclipse’s classpath to build (ugh)
  4. Use a common “lib” directory for all projects and dump the bundle jars there after compilation?
  5. Set up a bundle repository, parse the manifest from the build script and pull down the required bundles from the repository?

No. 5 sounds the cleanest, but also like a lot of overhead.

  • 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-05-14T18:32:08+00:00Added an answer on May 14, 2026 at 6:32 pm

    Basically, you can use:

    • source dependency (with Eclipse’s “referenced projects”)
    • binary dependency (using the jar of bundle A)

    But since binary dependency is much cleaner, it is also the kind of dependency best managed by a release management framework like maven.
    And you can integrate maven in your Eclipse project through m2eclipse.

    The Maven plugin to use would then be: maven-bundle-plugin, that you can see in action in:

    • Using maven to create an osgi bundle (osgi felix sample)
    • Bundle Plugin for Maven
    • Getting the benefits of maven-bundle-plugin in other project types
    • How to build OSGi bundles using Maven Bundle Plugin

    Consider this more real-world example using Felix’ Log Service implementation.
    The Log Service project is comprised of a single package: org.apache.felix.log.impl.
    It has a dependency on the core OSGi interfaces as well as a dependency on the compendium OSGi interfaces for the specific log service interfaces. The following is its POM file:

    <project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.log</artifactId>
      <packaging>bundle</packaging>
      <name>Apache Felix Log Service</name>
      <version>0.8.0-SNAPSHOT</version>
      <description>
        This bundle provides an implementation of the OSGi R4 Log service.
      </description>
      <dependencies>
        <dependency>
          <groupId>${pom.groupId}</groupId>
          <artifactId>org.osgi.core</artifactId>
          <version>0.8.0-incubator</version>
        </dependency>
        <dependency>
          <groupId>${pom.groupId}</groupId>
          <artifactId>org.osgi.compendium</artifactId>
          <version>0.9.0-incubator-SNAPSHOT</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
              <instructions>
                <Export-Package>org.osgi.service.log</Export-Package>
                <Private-Package>org.apache.felix.log.impl</Private-Package>
                <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                <Bundle-Activator>${pom.artifactId}.impl.Activator</Bundle-Activator>
                <Export-Service>org.osgi.service.log.LogService,org.osgi.service.log.LogReaderService</Export-Service>
              </instructions>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </project>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build

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.