Hello all.

I started using Karaf for my project, where having multiple versions of the
same bundle running is imperative.

I created two test bundles, which have identical project files except bundle
version in pom. I use managed service factory and BundleActivator.

1)
Problem (bug?): When I  deploy 1.1.0 bundle, BundleActivator is called from
1.0.0.
If I refactor BundleActivator classes so they have different names in 1.0.0
and 1.1.0, when I install 1.1.0 Karaf says “class not found”, meaning it is
looking in 1.0.0 jar.

Can anyone explain to me what am I doing wrong?

2)
I also have a configuration that gets bound only to 1.0.0, but not 1.1.0,
even though they have the same PID.

Is it possible to share configuration between different versions or must
1.0.0 and 1.1.0 have different PIDs and therefore different (copy/pasted)
metatype declarations?

Any help very much appreciated!
DonLuigi

P.S. Here is a pom snippet:
  <groupId>com.test </groupId>
  <artifactId>mock-operation1</artifactId>
  <version>1.1.0</version>
  <packaging>bundle</packaging>
  <name> Mock Operation 1</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.1.0</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
           
<Bundle-Activator>si.blah.osgi.MyBundleActivator</Bundle-Activator>
            <Bundle-SymbolicName>mock-operation-1</Bundle-SymbolicName>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

--
View this message in context: 
http://karaf.922171.n3.nabble.com/Problems-with-two-versions-of-the-same-bundle-tp3267839p3267839.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to