How do I enable Ebean Enhancement in Maven?

Viewed 3925
3 Answers

JBCP's answer is for old ebean version (org.avaje.ebeanorm). For newer version (io.ebean) you need to change to ebean-maven-plugin.

<plugin>
    <groupId>io.ebean</groupId>
    <artifactId>ebean-maven-plugin</artifactId>
    <version>${ebean.version}</version>
    <executions>
        <execution>
            <id>main</id>
            <phase>process-classes</phase>
            <goals>
                <goal>enhance</goal>
            </goals>
            <configuration>
                <packages>com.package1.**,com.package2.**</packages>
                <transformArgs>debug=1</transformArgs>
                <classSource>${project.build.outputDirectory}</classSource>
                <classDestination>${project.build.outputDirectory}</classDestination>
            </configuration>
        </execution>
    </executions>
</plugin>

Note: ebean plugin version should be the same as ebean version.

Reference: Maven Repo, Github

Related