Yes, they should never *have* to do it on the command line. If it was a way 
to optionally modify a jar, that's fine, but if its part of how it is built 
then it should not require anything other than the default phases on the 
command line.

The two options are:
- use packaging (in which case the osgi enabled JAR is the only thing built)
- add a plugins element to the POM which will enable building an osgi 
enabled version, as well as the main unmodified JAR while still using the 
standard goals.

It sounds to me like having the packaging is the right way to go - its a lot 
less work for the user when using defaults. It's entirely possible to do 
both with one plugin as well if that's valid, but it will add some confusion 
to the mix if its unnecessary.

- Brett

On 9/19/05, Enrique Rodriguez <[EMAIL PROTECTED]> wrote:
> 
> Brett Porter wrote:
> > Hi,
> >
> > These are closely related to each other.
> >
> > If it is to be something that only ever produces a JAR, then removing 
> the
> > -bundle sounds fine and you'd switch to a 
> <packaging>osgi-bundle</packaging>
> > technique, in which case install and deploy will just work, and will 
> involve
> > compilation, etc.
> 
> I very much like the idea of specifying by 'packaging' in the POM. It's
> one less thing source users have to remember to do on the command line.
> 
> Enrique
> 
> >
> > If sticking with the -bundle notation so that you can produce both a 
> regular
> > and bundled version of a JAR, then project.addAttachedArtifact(...) 
> should
> > be used to enabled install/deploy support. Both the bundle and the 
> original
> > JAR will be pushed together. The part that does the osgi modifications
> > should be put into the lifecycle (probably part of the resources or
> > packaging phases), allowing compilation and installation all to happen 
> in
> > one step.
> >
> > Hope this helps, and I'll try and spend some more time reviewing the 
> plugin
> > soon now that the m2 beta is out.
> >
> > Cheers,
> > Brett
> >
> > On 9/19/05, Enrique Rodriguez <[EMAIL PROTECTED]> wrote:
> >
> >>Some feedback on the Felix M2 Plugin:
> >>
> >>1) I don't like having my bundles named with the '-bundle' appended. I
> >>am used to bundles being jars with nothing in the naming specifying
> >>that. Since the manifest attributes of normal jars and osgi jars don't
> >>conflict, there is no harm generating a single jar that is usable as
> >>both a non-osgi jar and a bundle.
> >>
> >>2) I couldn't figure out how to 'install' or 'deploy'. Are these
> >>features in there yet?
> >>
> >>3) I would prefer to compile and bundle in a single step. With the
> >>maven-osgi-bundle my most-used goal is 'maven -o clean osgi:install'
> >>which would clean, compile, and install my bundle to my local repo. I
> >>then install or update in the framework directly out of the maven repo.
> >>
> >>Of course if you note any of these issues as bugs/new features I'll be
> >>sure to add them to JIRA. I was pretty easily able to get started with
> >>M2 and the Felix M2 Plugin and compile and bundle one of my projects. I
> >>think 'install' support is the main showstopper for me.
> >>
> >>Enrique
> >>
> >
> >
> 
>

Reply via email to