From: lukewpatterson <luk...@gm...> - 2009-04-10 14:34:53
|
On Thu, Apr 9, 2009 at 3:19 PM, Mike Forsberg <bi...@io...> wrote: > ... exposing JUnit as a service ... > I'll clarify the level of OSGi support I'm referring to. I was only hoping for compliance with the modularity/classloading portion of the OSGi spec, not the dynamic services portion. JUnit would not code to any OSGi API. No JUnit API would change. Existing consumer code which compiles to JUnit wouldn't need to change. The "modularity/classloading" portion I referred to above basically means that JUnit just needs proper OSGi entries added to the META-INF/manifest.mf. With the proper entries, the JUnit jar would become a "bundle" in the OSGi world. A "bundle" is basically a "module". i.e. a module contains packages, packages contain classes, classes contain fields/methods The manifest would explicitly declare (at the module level), which java packages JUnit imports (depends on) and which java packages JUnit exports (provides to others). In order for the JUnit jar to be considered a first-class citizen (can import/export packages directly) in the OSGi world, it needs to have valid manifest entries. Currently, when other projects are running in an OSGi container, they can't directly run against the official JUnit jar. They must custom-wrap the JUnit jar so its packages can be available at runtime. If you have some free minutes, please consider reading sections 1 through 1.4.3 of Neil Bartlett's "OSGi in practice" book [1]. I think he explains the core concepts pretty well (a lot better than I could). Thanks, Luke [1] http://neilbartlett.name/blog/osgibook/ -- View this message in context: http://www.nabble.com/OSGi-ify-JUnit---bug-2720888-tp22976430p22988877.html Sent from the JUnit - Dev mailing list archive at Nabble.com. |