从我的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>
答案 0 :(得分:1)
注意:我是该插件的作者。
为了简化配置,我建议您测试:https://github.com/ethlo/eclipselink-maven-plugin。
答案 1 :(得分:0)
使用EclipseLink 2.2.0,它适用于我而无需指定处理器。仍然需要编译器参数。