Mike wrote:
> My project has a similar layout.
>
> Here's the entire pom.xml.
> Entities are in src/main/java/...
> Persistence.xml in src/main/resources/META-INF. Here's the file but it's
> not terribly interesting.
>
> After running mvn clean && mvn compile I get the metamodel classes in
> target/classes/.../
>
> The only difference that's jumping out at me is that I specified the
> classes in persistence.xml - could you give that a try?
>
> -mike
Hi Mike,
I think I may have been looking in the wrong directory yesterday. Sorry.
Adding <compilerArgument>-Aopenjpa.metamodel=true</compilerArgument> does
work on my side. I wasn't expecting the sources to be generated in target.
I also noticed that one can use the mojo plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>openjpa-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>enhancer</id>
<phase>process-classes</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
</plugin>
It provides more verbose/info, but
<compilerArgument>-Aopenjpa.metamodel=true</compilerArgument> still has to
be set.
I believe this is information we could add in the OpenJPA guide.
Thanks for your help anyway !!!
--
View this message in context:
http://openjpa.208410.n2.nabble.com/Generation-of-Canonical-MetaModel-Classes-with-Maven-tp5424291p5431523.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.