Closed DimitriHautot closed 9 years ago
Hi Dimitri,
I haven't been able to reproduce this error. Would you mind sharing your entities or a basic project?
Hi John.
Sure, I'm finalizing the squeezing ... :-)
In the meantime, please be informed that I could already pinpoint the problem to be only occurring with Java 6. It is fine with 7 and 8.
Please find 3 files in here: https://gist.github.com/DimitriHautot/26ee0f6234be112762f1
I'm running with Maven 3.2.3.
First of all, thank you for pointing out that this only happens with Java 6 and for providing a basic project.
The error message you're seeing occurs because the apt-maven-plugin
scans all source files by default, searching for entities. As you pointed out, the plugin is still generating the Q classes correctly, but if you want to get rid of the error you can move ContactPredicates
to a different package and add the following:
<configuration>
...
<includes>
<include>be.rtbf.info.reptel.model</include>
</includes>
...
</configuration>
Unfortunately, you can only provide a package to the <include>
directive.
Thanks a lot John, for the fast & accurate answer!
Indeed, I added the <include />
element to match the package, and it worked fine.
Cheers,
Dimitri
Hi,
I have a Java class,
ContactPredicates
, that import a a generated class,QContact
.When I compile the project (
mvn clean compile
), theapt-maven-plugin
emits an information message (but does its job) when encountering this import statement.I believe this is misleading. Shouldn't the plugin first generate the code before looking at the hand-written code? (BTW, why does the latter happen?)
Here is my plugin configuration:
And here is the output of the command: