On 20 Jul 2009, at 15:49, Michael Caron wrote:
> I thought of tackling the issue of automated builds. I'm looking into
> the structure currently and figuring out a good route. I've used both
> Ant and Maven in the past. I'd prefer to use Maven because it's pretty
> easy to set up dependencies on things and just have them automatically
> included. I've got to familiarize myself with building eclipse plugins
> and how everything works together.
Building Eclipse is a challenge at the best of times :-) Actually,
there's some automated build support in Eclipse already (one can drive
the build from the feature, which is on the site) but it involves a
bit more setup than a corresponding Maven one would be. (The Eclipse
build is based on Ant builds, but knowing that doesn't actually help
much - there's a lot of cursing involved ...)
One downside of the Maven approach is that at runtime, the OSGi
bundles explicitly lock down visibility of packages. The JDT compiler
through the Eclipse build does error when you reach the wrong package,
so using a Maven build can result in a build that's successful and yet
not run at run-time.
I wrote a presentation for EclipseCon '06, which is probably a bit
dated by now, but it's available at
http://www.eclipsecon.org/2006/Sub.do?id=18
if you're interested ...
> Some questions that came up for me:
>
> 1. Using google's hosting service, is there a build farm that would
> run a build and serve nightly builds? If not, we could use one of our
> machines to do a nightly build and upload the resulting build to the
> code site wiki. Would be nice to have nightly builds going once build
> automation is complete.
There isn't any build farm machines, to the best of my knowledge. I've
been meaning to set up a virtual host on a Mac mini to do the work,
but I still haven't got around to that yet. But you're right, having a
nightly build and making the bits available is a good goal (provided
bandwith caps aren't a limitation).
> 2. First thoughts are to create a project to wrap all the build logic
> rather than put it in the root trunk folder. That particular project
> then could reference the others. Thoughts?
Could do. The Eclipse projects generally have a releng or build folder
which is used to drive the build. The example project above I ended up
hosting at SourceForge a long time ago (not done anything on it since
then, either) but used the feature to combine the releng feature in
one place.
http://rcpapps.cvs.sourceforge.net/viewvc/rcpapps/
For example, the 'base' feature involves checking out
http://rcpapps.cvs.sourceforge.net/viewvc/rcpapps/org.rcpapps.base.feature/releng/
and then running the build.xml there. However, you need to build with
an eclipse command (to host the ant runner in headless Eclipse, rather
than standalone ant).
There might be more up-to-date stuff than the instructions I wrote a
while ago - I've not set up any automated builds on 3.5 (or 3.4, for
that matter ...)
Alex