Hi,

You need to specify the packaging of your bundle. Moreover, for OSGi core dependency, you need to use <scope>provided</scope>. It means that packages are exported at runtime by another bundle. If you don't specify the scope, the osgi maven plugin put the jar file of the dependency in your bundle.

Try with the following pom file.


Clement

<?xml version="1.0"?><project>
 <parent>
   <artifactId>sfelix</artifactId>
   <groupId>fr.inria.ares</groupId>
   <version>0.1</version>
 </parent>
 <modelVersion>4.0.0</modelVersion>
 <groupId>fr.inria.ares</groupId>
 <artifactId>fr.inria.ares.sfelix.utils</artifactId>
 <name>SFelix Utils</name>
 <version>0.1</version>
 <url>http://sfelix.gforge.inria.fr/</url>
 <packaging>osgi-bundle</packaging> <!-- <- Specify the packaging -->
 <dependencies>
   <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>3.8.1</version>
     <scope>test</scope>
   </dependency>
   <dependency>
    <groupId>org.osgi</groupId>
    <artifactId>osgi</artifactId>
    <version>R4</version>
<scope>provided</scope> <!-- <- provided means that the packages will be exported -->
   </dependency>
 </dependencies>
 <build>
   <plugins>
     <plugin>
   <groupId>org.apache.felix.plugins</groupId>
   <artifactId>maven-osgi-plugin</artifactId>
   <version>0.8.0-SNAPSHOT</version>
       <extensions>true</extensions>
       <configuration>
         <osgiManifest>
<bundleActivator>fr.inria.ares.utils.activator.UtilsActivator</bundleActivator>
           <bundleName>SFelix Utilities</bundleName>
<bundleDescription>Utility classes for Secure Felix</bundleDescription>
           <exportPackage>fr.inria.ares.sfelix.utils</exportPackage>
       <bundleVendor>PParrend</bundleVendor>
         </osgiManifest>
       </configuration>
     </plugin>
   </plugins>
 </build>
</project>

Reply via email to