Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-build-dev] Eclipse Builds and Maven 2.x


Wendell Beckwith wrote on 06/06/2006 07:41:39 PM:

> This came up previously in this thread, http://dev.eclipse.
> org/mhonarc/lists/pde-build-dev/msg00076.html, but it seems to have
> fallen on the floor and rolled under the couch.  Nonetheless, my

Every once in a while we get a stick and poke around in the dark recesses under the couch but mostly this topic seems to just roll further away...  :-)

Seriously, it is quite interesting.  There is no desire to lock people into PDE or have PDE rule the world.  The main barrier has been the work required for us to get to know Maven and others getting to know PDE Build...  While the approach you outline feels plausible, there are some fundamental technology issues that need to be understood and addressed.

- Dependency management : Maven has a reasonable mechanism for finding and resolving dependencies.  Unfortunately, the OSGi dependency model is considerably richer.  As a result, maven will not know, for example, how to deal with Import-Package statements that spec arbitrary dependencies and use the "uses" directive.  

- Compiler options : A friend of dependency management is compiler options.  In particular, access rules.  PDE, based on the resolved dependency model, specifies various access rules or filters on JARs that are added to the classpath.  These limit what a particular project being compiled can see from a particular JAR.  It also facilitates various Eclipse extensions like x-internal and x-friends which are used extensively to ensure that teams are not overstepping API boundaries.

- Manifest management :  There is an ongoing debate about who owns the manifest.  PDE assumes that the bundle developer crafts the manifest while Mavenites craft POMs and then the manifest is generated.  The current maven-osgi plugin seems to do some merging on output but I think you still have to have dependencies spec'd in the POM (so duplicated if you are looking to use the PDE workflows, classpath containers, quick fixes, dynamic launch capabilities, ...

These are all elements that would need to be considered even in a scenario where you are using Maven to build just and individual project and using PDE build to orchestrate.

> From a high level eclipse wants to do pre and post actions for build
> setup, retrieving the source, building the feature/plugin, testing
> the plugin, assembling the feature/plugin, packaging and publishing
> the feature/plugin.  These actions map extremely well to maven 2's
> notion of a lifecycle.  Either the current default maven 2 lifecycle
> could be used or a custom plugin can be defined that uses an eclipse
> specific lifecycle similar to how the clover plugin has its own
> lifecycle.  To make this happen I think that there should be a org.
> eclipse.pde.build.IBuildScript interface that is used.  The current
> IAntScript interface could extend the IBuildScript interface to
> maintain backwards compatibility.  Nonetheless, if the lifecycle
> phase methods were placed in the IBuildScript interface then other
> methods builds systems (IMavenScript, IIvyScript, IJamScript, etc)
> could be plugged in at ease without being tied to a specific one.
>
> There may be glaring holes and over simplifications I have made but
> getting our builds working again in a smooth fashion is a priority
> goal I have and currently I have 1.5 engineers I can throw at the
> problem.  Thoughts??

It would be extremely interesting to see how one could use Maven to build, for example, the RCP feature for several platforms (say Win32 and Linux GTK x86) and produce the corresponding zips.  By this I mean, ignore PDE Build and imagine that we all went native Maven, fell in love with POMs and all started hand crafting them every chance we had.  What would the POMs look like?  How would it work?  Would it work?  How are the points above addressed?  Having understood this we can then look at how to automate parts of that process.

Does that make sense?

Jeff

Back to the top