Hi guys, What about the following proposal: 1. when the bundle plugin is building the classpath, for each artifact that is marked as "optional" in the pom, it builds a list of all packages inside the artifact jar and adds a corresponding import-package instructions with the resolution = optional 2. if an import instruction is already present it should not be overwritten, since users may want to override this behavior 3. when the build plugin is building the imports it will merge the referred packages with the import instructions, thus augmenting it with any resolution=optional attributes that may have been added in step 1
What do you think? On Tue, Jan 27, 2009 at 3:40 PM, <[email protected]> wrote: > Hi guys, > I'm walking my first steps in Maven bundle plugin, and I can say it has > been really helpful for now. > However, I seem to be missing how (if possible at all) can I instruct it to > mark the dependencies marked as "optional" in Maven to be imported with the > "resolution=optional". > My understanding so far is that these do not get processed by Maven Bundle > plugin, but are resolved by BND by looking at the imports, which are not on > the classpath, is this correct? > The project that I'm trying to bundle is built on top of Axis2 and has a > lot of optional dependencies (let's say tens of), I do not even know about > all of them because they did not > go into the standard distribution. But now it seems that BND finds the > references to them and assumes them to be mandatory adding a bunch of > imports in the manifest. > > These are really a lot, e.g. about 240 packages and all of them are not > actually required by the application unless the users explicitly enable a > certain feature. > So is there a way I can mark all the optionals as optional in the manifest, > without having to do it manually for each package? > > Kind Regards, > Detelin >

