Rice, It is possible to keep the packaging as jar, please see http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html , section " Adding OSGi metadata to existing projects without changing the packaging type".
HTH, B. -----Original Message----- From: Dileepa Jayakody [mailto:[email protected]] Sent: 29 February 2012 05:16 To: [email protected] Subject: Re: How to embed jar into a bundle? 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</m > anifestFile> > > > </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 > > > > > > The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 04677092. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Listed on the London Stock Exchange. Its subsidiaries IG Markets Limited and IG Index Limited are authorised and regulated by the Financial Services Authority (IG Markets Limited FSA registration number 195355 and IG Index Limited FSA registration number 114059). --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

