Hi, I've encountered the same issue as Detelin. See the corresponding JIRA issue -- https://issues.apache.org/jira/browse/FELIX-954
Cheers, -- PJ ________________________________________ From: Stuart McCulloch [[email protected]] Sent: Wednesday, January 28, 2009 3:04 PM To: [email protected] Subject: Re: Maven bundle plugin: Is it possible to mark optional Maven dependencies to be imported with resolition=optional 2009/1/28 <[email protected]> > 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? > yes, this might be possible - I've already been thinking about generating better defaults for the Export-Package/Private-Package settings based on analyzing the actual packages in "target/classes", and this would need very similar code can you open a JIRA feature request for this? > 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 > > > -- Cheers, Stuart --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

