Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] bundle builds using Maven

I'm using maven-bundle-plugin from Felix to generate the OSGi manifest
for all Maven generated jars, and it's gonna be probably the default
behavior in next version of Maven.

We added some tooling to generate 3rd party OSGi bundles pretty easily

On 5/16/07, Stuart McCulloch <stuart.mcculloch@xxxxxxxxxx> wrote:
On 17/05/07, Aaron Siri <Aaron.Siri@xxxxxxx> wrote:
> Thanks for the replies.  I realized what I was doing wrong.  You must call
> "mvn install" for it to properly build.  "mvn compile" (which I was trying to
> use) doesn't place the dependencies in the local repo for the dependant
> modules to build from.

yep, I've seen a lot of people hit the same problem when using maven to
build OSGi bundles, so I try to get people used to 'mvn install' in tutorials.

>
> Yes, Eclipse/maven building is a pain.  So far the PST maven plugin is
> working for us (with a few tweaks to their sources).  I'm experienced with
> the PDE tools but wanted to keep things as pure OSGi as possible.
>
> -Aaron
>
> > -----Original Message-----
> > From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-
> > bounces@xxxxxxxxxxx] On Behalf Of Stuart McCulloch
> > Sent: Tuesday, May 15, 2007 8:22 PM
> > To: Equinox development mailing list
> > Subject: Re: [equinox-dev] bundle builds using Maven
> >
> > Hi Aaron,
> >
> > On 15/05/07, Aaron Siri <Aaron.Siri@xxxxxxx> wrote:
> > >
> > > My organization has been attempting to use the Maven build process as
> > > described in the "Building Eclipse Plugins with Maven 2" by the
> > Princeton
> > > Softech guys to build a set of Equinox/OSGi bundles (not Eclipse
> > plugins.)
> > > I've successfully gotten a single bundle to build but am having
> > problems
> > > with cross-bundle dependencies.  I have an aggregator/super-pom that
> > > contains two modules - A and B.  B, as defined in the manifest,
> > depends on
> > > A.  A builds fine, but when B attempts to build it can't find A to
> > build
> > > against.  Is this situation supposed to work?
> > >
> > > I've made a slight modification to the Princeton Softech Maven plugin
> > that
> > > uses the bundle package "prefix" as the group Id (i.e.
> > > com.company.product.bundle would use "com.companyu.product" as the
> > group
> > > id.)  When the build errors out due to failed dependency resolution
> > it is
> > > looking for the artifact that I would expect it to (group id and
> > artifact id
> > > look correct.)
> > >
> >
> > I haven't used the PST plugin myself, but you might want to check the
> > manifest has a version for module B, and also that module B has been
> > correctly installed in the Maven repository.
> >
> > >
> > > The compilation can resolve the Equinox (3.3M7) bundles from the
> > manifest
> > > (using the group id change described above) and can find the
> > artifacts in
> > > the repo without issue.  It is just this cross-module building issue
> > that
> > > I'm having.
> > >
> > > A related question I have is what is the common method of building
> > equinox
> > > bundles?  Do most people just use the PDE tools included in Eclipse?
> > >
> >
> > A lot of people just use the PDE tooling, but there are other options
> > like Peter Kriens' BND tool which can be used as an Eclipse plugin
> > (see http://www.aqute.biz/Code/Bnd) and is also available in Maven
> > using the maven-bundle-plugin from the Apache Felix project.
> >
> > Personally, I use my own set of scripts to simplify creating bundles
> > (see http://wiki.ops4j.org/confluence/display/ops4j/Pax+Construct).
> >
> > These scripts take a different approach to PST, in that dependencies
> > must be specified in the Maven poms and the manifest is generated
> > from the code and the BND directives. Eclipse integration is minimal
> > at the moment, but is being actively improved.
> >
> > >
> > > -Aaron
> > > _______________________________________________
> > > equinox-dev mailing list
> > > equinox-dev@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/equinox-dev
> > >
> > >
> >
> >
> > --
> > Cheers, Stuart
> > _______________________________________________
> > equinox-dev mailing list
> > equinox-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/equinox-dev
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>


--
Cheers, Stuart
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                            -- The Princess Bride


Back to the top