JPA Hibernate Metamodel Generation durch Maven

Ich folgte dem JPA-Modellführen und ich konnte das kanonische metamodell generieren, das ich brauche. Mit diesem Pom einrichten:

<code><plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerArgument>-proc:none</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.bsc.maven</groupId>
                <artifactId>maven-processor-plugin</artifactId>
                <version>2.0.6-redhat</version>
                <executions>
                    <execution>
                        <id>process</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <outputDirectory>target/metamodel</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>target/metamodel</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
</code>

Die generierte Quelle wird ordnungsgemäß im angegebenen Verzeichnis erstellt, und ich muss sie manuell als Quelle im Klassenpfad des Eclipse-Projekts angeben, um sie zu verwenden. Wenn ich einen Maven auslöse, werden die Protokolle angezeigtcannot find symbol oderduplicate class und ich bekomme immer noch einen erfolgreichen Build. Meine Frage ist also, ob dieses Verhalten bei der Erstellung des Metamodells erwartet / korrekt ist. oder habe ich etwas in der cofig verpasst? Vielen Dank

Antworten auf die Frage(1)

Ihre Antwort auf die Frage