We’ve been discussing internally and separately with several contributors regarding the build issues occurring on the master branch in GitHub, especially with Eclipse 3.7. I’d like open up the discussion in our developers list and take this opportunity to clarify our goals for next 2.2 version and better coordinate our efforts and expectations :
1) Repair the Eclipse PDE build
The current/historical way we use to build from Eclipse is through OSGi bundles. If you install the PDE plugins (or choose the proper Eclipse editions), this should work by default as explained here (needs some update): http://wiki.restlet.org/developers/295-restlet/g1/216-restlet.html
For version 2.2, we are trying to migrate to the latest Eclipse 3.7 version, which now includes Maven support by default (built-in m2e plugin). The first step I’ve been trying to accomplish is to ensure that the pom.xml files present in the module directories don’t conflict with the usual Eclipse/PDE build process.
To use Eclipse/PDE build, you either need the “Eclipse Classic” edition which comes with PDE bundled, or to install PDE on top of the lighter “Eclipse IDE for Java” edition. Then, if you import both the modules and the libraries project as explained in the wiki, you should see the build work just fine.
We do have remaining issues with OAuth, OpenID extensions, as well as the examples project that need to be fixed. I’m a bit stuck on this so any help is welcome. Maybe Kristoffer and/or Martin can help for the OAuth and OpenID extensions?
2) Make the m2e build work
For 2.2, we would like the master to work with m2e as well (new name for m2eclipse), as it is now bundled by default since Eclipse 3.7 (IDE for Java).
Note that currently, our POM.xml files are not manually edited but instead generated by our forge (ant scripts) from our own module.xml files. This was necessary in order to support multi-edition builds and distributions in various channels (Eclipse update site, Maven update site).
So, in addition to adjusting the .project and .classpath files, we should ensure that we can (re-)generate the proper pom.xml files. Shaun Elliot has offered to help on that front and other contributions will be welcome, but we need to be careful when contributing changes to Eclipse project and pom files.
3) Ensure compatibility when both PDE build and m2e are active
Finally, we should try to make the build with both pde and m2e work at the same time in case the developers needs to develop in PDE/OSGi mode. Currently, I see no way to fully turn off m2e for a workspace or a project, which is annoying. There is probably a solution I’m not aware of.
The minimum is to ensure that there is no conflict and the binaries are produced in separate directories (bin for PDE and target/classes for m2e).
4) Integrate the org.restlet.ext.osgi extension
Once the previous steps are complete, at least the first ones, we’ll start integrating the contribution from Bryan Hunt and others currently located at:
This will allow fully dynamic usage of Restlet thanks to OSGi, such as adding new applications or resources on the fly.