Generating metatype in PDE project

We’re still stuck in PDE but I would like to use the bnd Meta annotation and bnd to generate the required XML file.

Is there a way to do this with my existing project or through a ant/gradle task or even from the command line?

Thanks
Alain

Easiest is to move to bndtools workspace model. Done it for several customers now that are extremely happy with the massively increased productivity by not having to worry anymore. :slight_smile:

You could use the bnd command line tool to repack the bundle using the wrap feature. This should then generate the XML automaticaly.

Believe me I wish it was the easiest, but still have some legacy plugin.xml, including EMF that is not straightforward.

I’ll try the repack approach. I was almost wondering how easy it would be to move those interfaces to their own bundles under bnd and then just use them within my PDE bundles, all with a single Eclipse workspace?

In my experience, bndtools is sooooooooo much more flexible than PDE that all problems are easily be solved. It became so flexible because we’ve simplified many extremely diverse and highly complex builds into a clean single workspace, adding the solutions to those problems to bnd.

You know bndtools Eclipse plugin, which also uses plugin.xml, is completely build in bndtools? Really, you’re not the first.

Although hybrid workspaces are always messy and tend to duplicate work, we do have experience. Actuallty the bnd workspace hosts a number of maven projects. Bndtools has a cool feature that might be useful.

I never tried to create a PDE-Bndtools hybrid and I expect there are problems since PDE does no build the bundle automatically. in bnd, you can set the -buildrepo to the local .m2 repo. Every time you make a change in bndtools, it will automatically install/publish the bundle to the maven repo. I assume the PDE project can then pick it up from there? However, this should be doable. Worst case we could develop a class path container for PDE that uses the bnd workspace.

So the hybrid approach is possible but I’d take the jump and solve the problem in the best possible way. (bndtools or something else.) Working for hundreds of customers in a large amount of settings I’ve observed that an enormous amount of effort and time tends to get wasted trying to avoid doing the right thing. Builds are so crucial for your team productivity that imho almost anything should be done to optimize them.

I have to agree with Peter. What you asked here leads me to the believe that you will end up with a frankenbuild.

We also moved all our Projects a couple of years back from PDE to bnd and life is so much easier since. We also use EMF in nearly all our Projects. Not sure what you are doing exactly, but there are solutions out there for a a couple of things that might be interesting for you:

  • Export of and RCP with pure bnd - the talk where I presented it: Talk and this is the Project: gecko.io / geckoBNDEquinox · GitLab
  • EMF without Extensionpoints (including automated code generation with bnd) - the talk where my colleague presented id and this is the Project: gecko.io / geckoEMF · GitLab
  • We also helped a couple of our customers to move to bnd and the feedback from all of them now get the sick when they have to work with PDE again.