felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: bundle plugin issues
Date Fri, 12 Jan 2007 00:38:11 GMT
Tom Huybrechts wrote:
> On 1/12/07, Richard S. Hall <heavy@ungoverned.org> wrote:
>> Tom Huybrechts wrote:
>> > I'm trying to use the maven-bundle-plugin to create a bundle for
>> > maven-embedder.
>> > I'm having two issues:
>> > - runtime-scoped dependencies are ignored. I would like to explicitly
>> > include some in the jar (even though they are not directly referenced)
>> I am not sure what you mean by this. The plugin does not do anything
>> automatically with maven dependencies. If you want stuff included inside
>> of your bundle JAR file, then the packages must be listed in
>> <Private-Package> or <Export-Package>.
>> The plugin essentially ignores maven dependencies, the dependencies just
>> represent what is available on the class path. You construct the
>> contents of your bundle by listing packages from the class path to
>> include inside of it.
> The maven dependencies are the source from which packages get
> included. But the dependencies are filtered, so only compile, system
> and provided scope dependencies remain. I don't see why runtime
> dependencies are filtered out.

Ok, I understand now. Sorry for my thick headedness. Maybe Peter has a 
reason why they are excluded, but I can't think of any.

>> In the future there may be some other ways of dealing with maven
>> dependencies, but Peter Kriens and I haven't had the time to think about
>> it yet.
>> > - I would like to create the bundle next to the original jar. If the
>> > plugin understood classifiers, I could do this. In this case, the
>> > bundle packaging is not needed.
>> I don't really understand this either...I must be dense today.
> I'm probably not explaining this very well...
> The bundle plugin now always builds the main artifact of the project.
> In Maven, it is also possible to attach additional artifacts to the
> build. These are distinguised by having classifier.
> e.g. the main artifact is my-project-1.0.0.jar and the bundle could be
> an attachted artifact my-project-1.0.0-bundle.jar. Both can be
> deployed to the repository simultaneously.
> The advantage to this is that you can add this to an existing project
> (possibly in an optional profile) without having to change the
> packaging type.

Ok, makes sense now. I don't know much about maven, so that is probably 
why I didn't understand. Sounds interesting. I was under the impression 
that maven only ever created one artifact (except perhaps test artifacts).

Well, attach the patch to the JIRA issue and I will look into it.

-> richard

> Tom
>> > I'm attaching a patch that implements both issues. I wanted to put it
>> > in JIRA, but could not find a component for this plugin ?
>> Just use the component for the maven OSGi plugin for now, since the goal
>> is to eventually have one plugin.
>> -> richard

View raw message