Richard, Thanks for the pointer, I'll do the reading and get back to you if I need any clarification.
Appreciate your help. Regards, Shamik On Fri, Jun 10, 2011 at 11:02 AM, Richard S. Hall <[email protected]> wrote: > Maybe this will have some advice: > > http://www.manning.com/hall/OSGIiAsamplech6.pdf > > -> richard > > On 6/10/11 13:56, Shamik Bandopadhyay wrote: >> >> Hi, >> >> I'm new to OSGI and trying to deploy my first application. I've a >> spring dependency in my pom. While deploying I realized that Felix >> runtime requires all transitive dependencies to install the bundle >> properly. Since then, I'm sort of struggling to resolve this issue. >> I've tried embedded-dependency and embedded-transitive options, but of >> no luck. Here's my pom. >> >> >> <project xmlns="http://maven.apache.org/POM/4.0.0" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 >> http://maven.apache.org/xsd/maven-4.0.0.xsd"> >> <modelVersion>4.0.0</modelVersion> >> <groupId>com.test</groupId> >> <artifactId>taxonomydaobundle</artifactId> >> <version>1.0.0</version> >> <packaging>bundle</packaging> >> <name>Taxonomy Dao Bundle</name> >> <url>http://maven.apache.org</url> >> <repositories> >> <repository> >> <id>fusesource</id> >> <url>http://repo.fusesource.com/maven2</url> >> <snapshots> >> <enabled>false</enabled> >> </snapshots> >> <releases> >> <enabled>true</enabled> >> </releases> >> </repository> >> <repository> >> <id>apache-public</id> >> >> <url>https://repository.apache.org/content/groups/public/</url> >> <snapshots> >> <enabled>true</enabled> >> </snapshots> >> <releases> >> <enabled>true</enabled> >> </releases> >> </repository> >> </repositories> >> >> <properties> >> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> >> </properties> >> >> <dependencies> >> <dependency> >> <groupId>com.test</groupId> >> <artifactId>taxonomymodelbundle</artifactId> >> <version>1.0.0</version> >> <scope>compile</scope> >> </dependency> >> <dependency> >> <groupId>org.springframework</groupId> >> <artifactId>spring</artifactId> >> <version>2.5.5</version> >> </dependency> >> <dependency> >> <groupId>junit</groupId> >> <artifactId>junit</artifactId> >> <version>3.8.1</version> >> <scope>test</scope> >> </dependency> >> </dependencies> >> >> <build> >> <plugins> >> <plugin> >> <groupId>org.apache.felix</groupId> >> <artifactId>maven-bundle-plugin</artifactId> >> <version>2.0.1</version> >> <extensions>true</extensions> >> <configuration> >> <instructions> >> >> <Export-Package>com.test.taxonomy.api.*;version=1.0.0 >> </Export-Package> >> >> <Import-Package>com.test.taxonomy.message.*;version=1.0.0, >> * >> </Import-Package> >> >> <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency> >> <Embed-Transitive>true</Embed-Transitive> >> </instructions> >> </configuration> >> </plugin> >> <plugin> >> <groupId>org.apache.maven.plugins</groupId> >> <artifactId>maven-compiler-plugin</artifactId> >> <version>2.1</version> >> <configuration> >> <source>1.6</source> >> <target>1.6</target> >> </configuration> >> </plugin> >> </plugins> >> </build> >> </project> >> >> mvn install only embeds the direct dependency jars in the bundle. >> When I try to install the bundle in Felix, its throwing import errors >> as it's failing to resolve the dependencies. Here's a snippet : >> >> Imported Packages ERROR: bsh -- Cannot be resolved >> ERROR: com.caucho.burlap.client -- Cannot be resolved >> ERROR: com.caucho.burlap.io -- Cannot be resolved >> ERROR: com.caucho.burlap.server -- Cannot be resolved >> ERROR: com.caucho.hessian.client -- Cannot be resolved >> ERROR: com.caucho.hessian.io -- Cannot be resolved >> ERROR: com.caucho.hessian.server -- Cannot be resolved >> ERROR: com.ibatis.common.util -- Cannot be resolved >> ERROR: com.ibatis.common.xml -- Cannot be resolved >> ERROR: com.ibatis.sqlmap.client -- Cannot be resolved >> ERROR: com.ibatis.sqlmap.client.event -- Cannot be resolved >> ERROR: com.ibatis.sqlmap.engine.builder.xml -- Cannot be resolved >> ERROR: com.ibatis.sqlmap.engine.impl -- Cannot be resolved >> ERROR: com.ibatis.sqlmap.engine.transaction -- Cannot be resolved >> ERROR: com.ibatis.sqlmap.engine.transaction.external -- Cannot be resolved >> ERROR: com.ibatis.sqlmap.engine.type -- Cannot be resolved >> ERROR: com.ibm.wsspi.uow -- Cannot be resolved >> ERROR: com.jamonapi -- Cannot be resolved >> ERROR: com.mchange.v2.c3p0 -- Cannot be resolved >> ERROR: com.sun.enterprise.loader -- Cannot be resolved and overwritten >> by Boot Delegation >> ERROR: com.sun.net.httpserver -- Cannot be resolved and overwritten by >> Boot Delegation >> ERROR: com.sun.rowset -- Cannot be resolved and overwritten by Boot >> Delegation >> ERROR: commonj.timers -- Cannot be resolved >> ERROR: commonj.work -- Cannot be resolved >> ERROR: edu.emory.mathcs.backport.java.util.concurrent -- Cannot be >> resolved >> ERROR: freemarker.cache -- Cannot be resolved >> ERROR: freemarker.template -- Cannot be resolved >> >> My understanding was using<Embed-Transitive>true</Embed-Transitive> >> will embed all transitive dependency jars in the bundle,but apparently >> that's not been the case so far. >> >> I'll appreciate if someone can tell what's the right approach to >> resolve this issue. >> >> -Thanks >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

