Building deegree with m2eclipse

After playing around a bit with the new Eclipse Indigo release, I decided to see how well the included m2eclipse plugin works for providing a painless setup of a deegree development environment.

As with most Maven-based projects, it’s fairly easy to perform a full deegree build from the command line (as long as you have SVN, Maven 3 and Oracle JDK 6 installed):

svn co http://svn.wald.intevation.org/svn/deegree/deegree3/trunk
cd trunk
mvn install


However, it can be quite tough to set up a full deegree 3 development environment in Eclipse. Manual setup is not an option, as you would have to setup dozens of modules, dependencies and classpaths manually. It’s possible to use the official Maven Eclipse plugin, but you still have to deal with flattening deegree’s multi-module structure to make it work in a standard Eclipse installation, as Eclipse does not have native support for hierarchical module structures. Also, many people prefer an integrated solution that does not involve touching the command line.

In theory, m2eclipse solves that: It integrates full-blown Maven support into Eclipse (including support for multi-module projects). Ideally, you would just check out deegree’s root module from SVN, and your Eclipse workspace would be populated automatically with all deegree modules.

Unfortunately, this doesn’t seem to be the case (for now) 😦

Mapping Maven build plugins to m2e connectors

As can be seen, m2eclipse is currently not able not map all Maven plugins used by deegree to Eclipse plugins. And this results in many unresolved build errors.

Build errors

Although it’s possible to ignore specific Maven plugins in the build, this doesn’t seem to work for plugins that generate source code (such as the JAXB plugin).

To conclude: Until we can map all relevant Maven plugins to corresponding m2e extensions, there will be no one-click solution for setting up a deegree development environment using m2eclipse 😦

For now, the recommended way for setting up a deegree development enviroment is to use the Maven Eclipse plugin from the command line — with some help of the deegree maven plugin. Check out this blog post from Andreas that explains how to use it.

Advertisements

About Markus Schneider

Geospatial software developer, CEO of Occam Labs
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Building deegree with m2eclipse

  1. Martin says:

    BTW: Maven3 is not offered by official Ubuntu/Debian repositories yet. However there is a thrid-party repository providing a package:
    http://www.discursive.com/blog/4636

    Find mvn in /usr/local/maven/bin.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s