You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jochen Mader <pf...@gmail.com> on 2009/12/03 14:24:51 UTC

Build process

Quite simply: I don't like my build process.
I am looking for a way of doing builds that stays true with the OSGi
philosophy.
I got my builds going with Maven, BND and OBR. But looking at the poms
always gives me the shivers.
The thing that drives me nuts is the replication of dependency information
(the maven shotgun approach of "give me the bundle" vs the OSGi sniper
approach "give that package").
We have to specify the dependencies once to do our build and a second time
to generate the manifest (BND).
I can't make use of the extended meta information an OSGi bundle contains
to, let's get wild, resolve my dependencies AND transitive dependencies from
an OBR.
Is there some work being done that goes into that direction? Probably a
project I could join?
Something like maven plugin that replaces the dependency declarations with a
"go to BND and grab the information from there as we are way too lazy to
type that stuff more than once" :)

CU

Jochen

Re: Build process

Posted by David Savage <da...@paremus.com>.
Hi Jochen,

So trival hudson integration is easy in that it is just an ant build
that wraps the sigil build so all the normal hooks apply. I admit I've
not looked into any deeper integration - can you provide any links to
the sort of functionality you'd be looking for here?

Maven integration is something that I'd really like to work towards as
it's obviously a big part of the software build ecosystem. The choice
of ivy was in the main purely practical, as when we wrote sigil maven
2 didn't provide enough flexibility to plugin package level resolution
(at least not to my understanding).

I chatted with Jason a while ago when he was in London and Tycho looks
like a major step in the write direction in terms of plugability. But
hours in the day has meant that I've not made any progress in this
area. As it's all OSS if there is sufficient will to bring these two
worlds together then it's probably (?) just a matter of man hours.

Regards,

Dave

On Thu, Dec 3, 2009 at 2:14 PM, Jochen Mader <pf...@gmail.com> wrote:
> So it does what I want from the OSGi side :)
> Now I will have to check how to integrate this with a maven/hudson build and
> the underlying structure.
> Have you tried something like that?
>
> CU
>
> Jochen
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Build process

Posted by Jochen Mader <pf...@gmail.com>.
So it does what I want from the OSGi side :)
Now I will have to check how to integrate this with a maven/hudson build and
the underlying structure.
Have you tried something like that?

CU

Jochen

Re: Build process

Posted by Jochen Mader <pf...@gmail.com>.
Thanks for the quick reply.
I will grab it and play around with it this weekend.

Cheers,

jochen

Re: Build process

Posted by Jochen Mader <pf...@gmail.com>.
To be honest:
Right now I wouldn't care about how mature/immature a project is.
Sigil is right now the tool that is closest to the actual philosophy of
OSGi. But Sigil doesn't work with Maven (and its way of building stuff is
very different from what maven does)
OSGi is not only a good platform to build software on but also a
modularization framework that helps java to get almost apt-get like
functionality.
Tools like BND and Bundlor approach the Maven-OSGi-integration from the
wrong side.
There OSGi is just another app framework with certain build requirements
instead of a full module layer that can help dealing with the java
dependency hell.

When building an OSGi project I want to
a) resolve dependencies exclusively from OBR, thereby avoiding the necessity
to check if I really got an OSGi-Bundle and also to resolve transitive
dependencies
b) specify import/export information once (could be BND, but I want to reuse
this information for a) )

CU

Jochen

Re: Build process

Posted by Mike Haney <tx...@gmail.com>.
Tycho and Sigil both look promising, bit IMO are too immature at this stage
for production/enterprise work.

After working with this stuff for awhile, it's really not as bad as I first
thought.  Coming from developing Eclipse plugins for the last 4-5 years, we
too were accustomed to the PDE/Eclipse way of doing things.  I have to say
though, breaking out of the PDE mindset has actually been quite liberating.

We currently use Bundlor from the Spring DM project to generate our
manifests, although we are investigating switching to the Felix BND plugin
since we are migrating from DM Server to an embedded Felix framework.

What we do is just treat the manifest as a generated resource, i.e. it's
always generated from the build and never even checked into subversion.  We
also have Bundlor configured to copy the manifest to the
src/main/resources/META-INF directory for use within Eclipse (just remember
to add MANIFEST.MF to the Ignored Resources for version control).  The
Bundlor plugin does a nice job of finding all the dependencies and
generating the correct Import/Export Package entries in the manifest.  I
rarely have to override it to force it to add an import.  From what I've
read, all of this is possible using the BND plugin as well, but we're still
evaluating to decide which one to go with for this next iteration of our
project.

While developing, it's possible to regenerate the manifest from within
Eclipse if you are using the Spring Tools, although I usually encourage my
developers to just run a maven build instead - that way you also update the
manifests of other plugins that might have been affected.

I think one benefit of this approach is that it forces you to think a little
bit more about what you are doing, rather than just having an IDE generate
everything for you.  The learning curve is a little steeper, but in the end
you'll be able to solve problems a lot quicker because you know how
everything is supposed to work.

On Fri, Dec 4, 2009 at 3:29 AM, Jochen Mader <pf...@gmail.com>wrote:

> Thanks for all the suggestions.
> The maven-bundle-plugin is what I am using right now but it only provides
> means of creating and maintaining an OSGi infrastructure, not reausing the
> meat information from OSGi, which is what I am looking for.
> Both Tycho and Sigil look very promising but for my scenario they both have
> the same problem:
> Missing maven 2 integration (Tycho only works with maven 3 and even ships
> it
> with the downloadable).
> I am working in the enterprise area and things there are moving at glacial
> speed.
> We will be stuck with maven 2 for quite some time and if I want to get OSGi
> into our projects I will have to integrate everything with the existing
> architecture which is maven 2 + hudson.
>
> CU
>
> Jochen
>

Re: Build process

Posted by Jochen Mader <pf...@gmail.com>.
Thanks for all the suggestions.
The maven-bundle-plugin is what I am using right now but it only provides
means of creating and maintaining an OSGi infrastructure, not reausing the
meat information from OSGi, which is what I am looking for.
Both Tycho and Sigil look very promising but for my scenario they both have
the same problem:
Missing maven 2 integration (Tycho only works with maven 3 and even ships it
with the downloadable).
I am working in the enterprise area and things there are moving at glacial
speed.
We will be stuck with maven 2 for quite some time and if I want to get OSGi
into our projects I will have to integrate everything with the existing
architecture which is maven 2 + hudson.

CU

Jochen

Re: Build process

Posted by Stuart McCulloch <mc...@gmail.com>.
2009/12/3 David Savage <da...@paremus.com>

> Hi Jochen,
>
> You may want to look at Sigil [1] which is hosted here at Felix. This
> uses exactly the approach you suggest in that it resolves package
> dependencies from OSGi manifest files.
>

for completeness I should mention the Tycho project, which can do
manifest-first or pom-first:

   http://docs.codehaus.org/display/M2ECLIPSE/Tycho+project+overview

as well as our very own Felix maven-bundle-plugin, which is more about
re-using Maven details:

   http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

hope that hasn't muddied the waters...


> To see an example of a sigil build in action you may want to check out
> a recent blog post [2] I made which is actually related to our product
> but uses a sigil build to create the necessary bundles.
>
> Very happy to receive feedback, issues or code contributions in this area
> :)
>
> Regards,
>
> Dave
>
> [1] http://felix.apache.org/site/apache-felix-sigil.html
> [2] http://chronological-thought.blogspot.com/2009/11/hello-tatooine.html
>
> On Thu, Dec 3, 2009 at 1:24 PM, Jochen Mader <pf...@gmail.com>
> wrote:
> > Quite simply: I don't like my build process.
> > I am looking for a way of doing builds that stays true with the OSGi
> > philosophy.
> > I got my builds going with Maven, BND and OBR. But looking at the poms
> > always gives me the shivers.
> > The thing that drives me nuts is the replication of dependency
> information
> > (the maven shotgun approach of "give me the bundle" vs the OSGi sniper
> > approach "give that package").
> > We have to specify the dependencies once to do our build and a second
> time
> > to generate the manifest (BND).
> > I can't make use of the extended meta information an OSGi bundle contains
> > to, let's get wild, resolve my dependencies AND transitive dependencies
> from
> > an OBR.
> > Is there some work being done that goes into that direction? Probably a
> > project I could join?
> > Something like maven plugin that replaces the dependency declarations
> with a
> > "go to BND and grab the information from there as we are way too lazy to
> > type that stuff more than once" :)
> >
> > CU
> >
> > Jochen
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
-- 
Cheers, Stuart

Re: Build process

Posted by David Savage <da...@paremus.com>.
Hi Jochen,

You may want to look at Sigil [1] which is hosted here at Felix. This
uses exactly the approach you suggest in that it resolves package
dependencies from OSGi manifest files.

To see an example of a sigil build in action you may want to check out
a recent blog post [2] I made which is actually related to our product
but uses a sigil build to create the necessary bundles.

Very happy to receive feedback, issues or code contributions in this area :)

Regards,

Dave

[1] http://felix.apache.org/site/apache-felix-sigil.html
[2] http://chronological-thought.blogspot.com/2009/11/hello-tatooine.html

On Thu, Dec 3, 2009 at 1:24 PM, Jochen Mader <pf...@gmail.com> wrote:
> Quite simply: I don't like my build process.
> I am looking for a way of doing builds that stays true with the OSGi
> philosophy.
> I got my builds going with Maven, BND and OBR. But looking at the poms
> always gives me the shivers.
> The thing that drives me nuts is the replication of dependency information
> (the maven shotgun approach of "give me the bundle" vs the OSGi sniper
> approach "give that package").
> We have to specify the dependencies once to do our build and a second time
> to generate the manifest (BND).
> I can't make use of the extended meta information an OSGi bundle contains
> to, let's get wild, resolve my dependencies AND transitive dependencies from
> an OBR.
> Is there some work being done that goes into that direction? Probably a
> project I could join?
> Something like maven plugin that replaces the dependency declarations with a
> "go to BND and grab the information from there as we are way too lazy to
> type that stuff more than once" :)
>
> CU
>
> Jochen
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org