Thursday, September 11, 2008

PDE and MDSD [problem generated code and nested src]

Its a good practice in a model-driven project to separate generated code from manually written code. (Generated code normaly will not be in your cvs / svn)

Eclipse Modeling and openArchitectureWare makes this easy: you can define different outlets in your workflow and XPand templates for generated code. manual code, resources etc.

As result you get a Plug-In Project with some nested src - folders. This is no problem for the Eclipse Java Compiler.

If you try to Export PDE - as deployable Plug-In you run into an error: 



PDE cannot export Plug-In projects with nested src folders. (s.a. Bugzilla with a small example project from me 241830)


  1. Before PDE - Exporting copy the Plug-In Project into a temporary second Plug-In and merge all src - folders into the one and only /src root folder. (Now the workflow while developing and testing isn't as easy as before)
  2. Instead of PDE Export you can use a normal Java - Export as JAR (Loosing the comfort from PDE to auto-detect the Manifest file, versioning ....)
  3. Create some ANT Tasks...

But I'm still looking for the pure PDE solution. Perhaps anyone has an idea how to make PDE happy with nested src folders ?

1 comment:

Benjamin Cabé said...

I once ran into this exact same problem too :-/
See my comment on bug #241830