openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JVerstry <jvers...@gmail.com>
Subject Re: Generation of Canonical MetaModel Classes with Maven
Date Wed, 18 Aug 2010 01:02:00 GMT

After more research and reading, I come to the following conclusion:

i) The latest version of the documentation you refer to says: "The source
code is generated relative to the directory specified in -s option of javac
compiler and defaulted to the current directory." But, there is no such
thing as a 'current directory' concept in maven, especially when started
from IDE. This is confusing.

In addition, there is no operational control/option to specify that
directory. I can't make the -s javac option work in maven.

ii) When I use <compilerArgument>-Aopenjpa.metamodel=true</compilerArgument>
in my pom.xml, the metamodel code is generated.

When I use <compilerArgument>-Aopenjpa.metamodel=true
-Aopenjpa.log=INFO</compilerArgument>, it is not, although openjpa.log is
described as a valid parameter in the documentation. Moreover, there is no
warning and no message in the maven compilation log.

This does not fit with expected behavior.

Before looking into more solutions - like adding an ant step in maven - I
think we need to deal with these issues first. Maven already knows how to
invoke annotation processor. We shouldn't need an extra plugin.

If AnnotationProcessor6 works on Java source code - which I believe it does,
because it seems to happen before source code is converted into bytecode -
then we should be able to have to meta classes generated in maven source
directories, rather than somewhere in target directories.

All this would kill the circular issue at the first compilation run. All
java classes required for compilation would be available.

Conversely, if we can't achieve this, then how can one develop an
application referring to metamodel code? I can't imagine users copying
generated code at each compilation run...
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Generation-of-Canonical-MetaModel-Classes-with-Maven-tp5424291p5434686.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message