1

From my pom http://code.google.com/p/memorizeasy/source/browse/MemoPlatform/persistence/pom.xml:

<plugin>
                <groupId>org.bsc.maven</groupId>
                <artifactId>maven-processor-plugin</artifactId>
                <version>1.3.7</version>
                <executions>
                    <execution>
                        <id>process</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
              <!-- Without this, the annotation processor complains about persistence.xml not being present and fail -->
                            <compilerArguments>-Aeclipselink.persistencexml=src/main/resources/META-INF/persistence.xml -Aeclipselink.persistenceunits=com.mysimpatico_MemoPlatform-database_nbm_1.0-SNAPSHOTPU</compilerArguments>
              <!-- For an unknown reason, the annotation processor is not discovered, have to list it explicitly -->
                            <processors>
                                <processor>org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor</processor>
                            </processors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <inherited>true</inherited>
                <configuration>
                    <compilerArgument>-proc:none</compilerArgument>
                </configuration>
            </plugin>

We discussed this last year here, and reported a relevant bug (no one cared about @eclipselink).

Community
  • 1
  • 1
simpatico
  • 10,709
  • 20
  • 81
  • 126

2 Answers2

1

Note: I'm the author of the plugin.

To make configuration a lot simpler I would recommend you test: https://github.com/ethlo/eclipselink-maven-plugin.

Morten Haraldsen
  • 1,013
  • 12
  • 24
0

With EclipseLink 2.2.0, it works for me without specifying the processor. The compiler argument is still needed.

Haakon
  • 1,741
  • 10
  • 19