1

私のポン 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>

これについては昨年ここで議論し、関連するバグを報告しました(誰も @eclipselink を気にしませんでした)。

4

2 に答える 2

1

注: 私はプラグインの作成者です。

構成をより簡単にするために、https://github.com/ethlo/eclipselink-maven-pluginをテストすることをお勧めします。

于 2013-01-17T11:52:20.387 に答える
0

EclipseLink 2.2.0 では、プロセッサを指定しなくても機能します。コンパイラ引数は引き続き必要です。

于 2011-06-10T10:48:38.680 に答える