Hi Rice, The maven-bundle-plugin uses BND tool [1] underneath to write the bundle manifest of your OSGI bundle. Embed-Dependency is a directive executed by the bnd tool to pull the given dependency jar into the bundle class-path. AFAIK the purpose of using the maven-bundle-plugin should be to create an OSGI bundle, hence the packaging type should be bundle.
Thanks, Dileepa [1] http://www.aqute.biz/Bnd/Bnd On Wed, Feb 29, 2012 at 10:14 AM, Rice Yeh <[email protected]> wrote: > After change the packaging from jar to bundle, it works. Just wonder what > should I do if I don't want to change my packaging? > > Rice > > On Wed, Feb 29, 2012 at 12:32 PM, Dileepa Jayakody <[email protected]> > wrote: > > > Hi Rice, > > > > Did you check if you have defined the dojo dependency correctly under > the > > <dependencies> section of your pom? > > > > Regards, > > Dileepa > > > > On Wed, Feb 29, 2012 at 9:26 AM, Rice Yeh <[email protected]> wrote: > > > > > Hi, > > > I use <Embed-Dependency> in maven-bundle-plugin to embed a jar to a > > > bundle. The resulted manifest is correct but the jar is not embedded in > > the > > > bundle. What more should I do to have it embedded in my bundle? My > maven > > > pom is like the following: > > > > > > <plugin> > > > <artifactId>maven-jar-plugin</artifactId> > > > <configuration> > > > <archive> > > > > > > > > > > > > <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> > > > </archive> > > > </configuration> > > > </plugin> > > > <plugin> > > > <groupId>org.apache.felix</groupId> > > > <artifactId>maven-bundle-plugin</artifactId> > > > <extensions>true</extensions> > > > <executions> > > > <execution> > > > <id>bundle-manifest</id> > > > <phase>process-classes</phase> > > > <goals> > > > <goal>manifest</goal> > > > </goals> > > > </execution> > > > </executions> > > > <configuration> > > > <instructions> > > > > > > <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> > > > > > > <Bundle-Activator>xs.common.rs.Activator</Bundle-Activator> > > > <Export-Package>xs.common.rs > > > ;version=${project.version}</Export-Package> > > > <Import-Package> > > > as.*;xs.*;version="[1.5,2)", > > > javax.servlet;version=2.4, > > > * > > > </Import-Package> > > > > > > <Embed-Dependency>dojo;scope=runtime</Embed-Dependency> > > > </instructions> > > > </configuration> > > > </plugin> > > > > > > > > > Rice > > > > > >

