Hi Peter, That is no problem. Actually it will be my pleasure. I'm a big beneficiary of the tools you and the PAX folks like Toni et all. Glad to have a chance to give back something to the community . I want to make sure that you know that the application I got from the IBM RedBook Site was already and OSGi albeit with no Maven, ITest (nothing) etc
These are the things I have done! 1. Take the vanilla OSGi Bank application from IBM Red Book (SG24-7911-00) 2. Created Bank Parent POM project and Child Bundle projects including ITest using PAX - Note that I also created an Embedded derby datasource bundle which the IBM project did not have. I also created a datasource fragment bundle to load data into the DB. I did this to demonstrate fragments to other developers who are new to OSGi 3. I used Maven Felix plugin (osgi.bnd file to customize). 4. Used mvn pax:provision to run the app in Felix Console 5. ITested using PAXExam But my client is RAD/WAS based. So I wanted to convert the PAX/BND/Maven based project so that RAD will understand them. This will make it easier to create an OAGi Application Bundle(very IBM RAD specific) and deploy to WAS (RAD will create bundles on the fly - using underlying Eclipse PDE) create an EBA and deploy. Now the developer can even deploy. This is just a nice feature to have, If nay thing I encourage them to do everyhting out side WAS as it is very slow. The above step took me the most of time! I will clean everything and send it to you.Like I had mentioned before I need to change the bundle names/package name's from my client's reverse domain name to some thing generic. Any idea on the domain name? Will keep you informed. Thanks Matt On Tue, Aug 23, 2011 at 1:59 PM, Peter Kriens <[email protected]>wrote: > Well, at least your experiences and feedback would be appreciated. I can > take that to the guys local here and they probably would not mind distribute > it as an OSGi app as long as it also runs on older envs. > > Kind regards, > > Peter Kriens > > On 23 aug 2011, at 19:29, Matt Madhavan wrote: > > > Hello Peter, > > Couple of things! I agree with you and let the BND do its thing. Also not > > sure why IBM guys had so many jars in the bundle classpath. I can see may > be > > something like a struts.jat and sitelib.jar being there and not commons! > > > > Also looks like the dependency to orag.apache.log and other Avalon > > dependencies come from PAX Logging bundles. Not sure why they would need > to > > be referencing to these? In any case they are marked optional. > > > > The app works fine when deployed to Felix using mvn pax:provision. When I > > deploy to WAS it says my web bundle has a required dependency to > > org.apache.log and fails. Its actually a transient dependecy. > Unfortunately > > the IBM OSGi Console is not really a good tool! Like equinox or Felix > > console I cannot trace the missing transient dependency at all. If the > EAB > > fails to load it shows nothing - zip! > > > > Actually the bank application I took from IBM was from the IBM RedBook on > > OSGi/JPA. The app was already in OSGi and I converted it to use PAX and > > Felix Bundle Plugin, ITests etc. I'm now trying to convert this app to be > > RAD friendly and now I'm running into all kinds of issue with RAD/WAS. > > > > If you are interested in this app, I will have to change the Package > names. > > I currently has the package name of my client's reverse domain name. I'm > not > > sure if I can give it out like that. I will change it and publish it when > > its ready. > > > > Thanks > > Matt > > > > On Tue, Aug 23, 2011 at 3:08 AM, Peter Kriens <[email protected] > >wrote: > > > >> Well, you should let bnd do its work, these dependencies are really > there > >> and potentially reachable from the code. It is just a sign how messy the > >> current development is that we like to ignore they exist ... > >> > >> However, you want to get rid of the warnings. What you can do in the > maven > >> plugin is ignore certain imports with the bang (exclamation mark). > >> Import-Package: !org.apache.log, * > >> > >> Or better, make them optional: > >> > >> Import-Package: org.apache.log;resolution:=optional,* > >> > >> You can use wildcards with the bang as well as the optional. I know it > >> sounds like busy work but I think it is crucial to realize that you got > >> these trojans and space wasters in your WAR file. > >> > >> Don't forget the * at the end. > >> > >> Could you send me your project after you've done this? I know some > people > >> here in IBM Montpellier that were thinking of taking the bank app and > port > >> it to OSGi. I understood they are the authors of this app. > >> > >> Kind regards, > >> > >> Peter Kriens > >> > >> > >> > >> > >>> Hello Peter, > >>> As posted in an earlier post (actually a reply to your reply) I have a > >>> stringent requirement from my client that everything I do as far as > OSGi > >>> development process, must run seamlessly with in IBM RAD and WAS env. > But > >> my > >>> OSGi development process is mainly of BND and PAX based! > >>> > >>> So as a POC I took an example from IBM RedBook called the bank > >> application, > >>> and converted (created a new project from scratch) using PAX and BND. > >> Now > >>> I'm trying to convert the project so that RAD will recognize if as OSGi > >> RAD > >>> project etc. After a lot of frustrating hrs and days I'm close to make > it > >>> work in RAD env. > >>> > >>> Only problem is the example has bunch of JARS inside the WEB-INF/lib > >> folder. > >>> The same jars deploy just fine when deployed as part of the original > IBM > >> RAD > >>> Bank app. > >>> > >>> But when I build a bundle (including generating the > META-INF/MANIFEST-MF) > >>> the BND tools introspects the WEB-INF/lib jars also! This results in > some > >>> missing transient dependencies to old Apace Avalon org.apache.log > >> packages. > >>> I have no idea how this happens! Not sure which bundle is referring to > >> this > >>> package at all! > >>> > >>> Question is how do I tell Apache Maven Plugin to ignore the jars in > >>> WEB-INF/lib folder while generating the META-INF/MANIFEST.MF file? One > >>> option will be to hard code the META-INF/MANIFEST.MF, but I really do > >> not > >>> want to do that! Any ideas please? > >>> > >>> Thanks in advance! > >>> > >>> Matt > >> > >> > >

