Redirecting to /docs/getting-started/eclipse-ide

Introduction

Installing the enhancement plugin

This plugin performs both entity bean and query bean enhancement.

Eclipse IDE APT

Query bean generation (Java annotation) with Eclipse IDE

The Eclipse IDE plugin is installed from: http://ebean.io/eclipse/update

Overview

If you want to use Query beans it is best that they are generated via Java annotation processing. Ebean provides querybean-generator which is a java annotation processor that generates query beans.

Normally we just need to add the querybean-generator as a maven dependency and it will all automatically work (with Maven and IntelliJ) but with Eclipse IDE we need some extra setup in order for it to work.

This page documents the extra setup we need for Eclipse IDE such that it becomes aware of the querybean-generator APT processor and generates query beans for us during development.

1. Install m2e apt plugin

First install the m2e apt plugin (by Redhat) from the Market place.

This plugin allows us to configure Eclipse to find java annotation processors in the maven classpath (just like Maven and IntelliJ do automatically).

2. Preferences / Maven / Annotation processing

Goto Preferences / Maven / Annotation processing and select the option. "Automatically configure JDT APT" is usually a fine default.

3. Project / Java compile / Annotation processing

Turn on annotation processing for the project.

4. Project / Java compile / Annotation processing / Factory Path

Check the Factory Path. It is ok if all entries in the classpath are selected but what MUST be selected is querybean-generator and additionally persistence-api and ebean (we need these last 2 as they contain annotations that querybean-generator is reading as part of it's code generation).