java - How to configure JPAMetaModelEntityProcessor to not get "Duplicate class" error? -


I use Hibernate-japamodelgen to generate my JPA meta-model as part of my Maven Build Trying I am using configuration.

However, when I build, I get the following error when I mvn clean install :

  [error] C: \ User \ ArtB \ document \ code \ xxx \ target \ classes \ me \ Page_.java: [11,16] Error: Duplicate class: me.Page_  

From some investigation it seems That generated meta-model is twice or something else.

If I clear; MVN Clean Generation-Source; Ls -l target \ generated-sources \ apt \ me I just do not have the file _Page.java and no other file.

In the compilation step target \ classes \ folder is just \ me \ _Page.java ... which I The thought that looks strange .class should appear in the "\ target \ classes" folder.

I built with debug (i.e. -X ) and did not see anything suspicious.


I doubt it, but here are my models.

  package me; @ Entity @Table (name = "page") public class page {@Id @GeneratedValue Private long ID; Private string title; Retrieve personal quick final; Personal page category category; Private URL source; @ Private private string content; // hashode, par, gates & amp; Setters omitted}  

and

  package me; Public enum PageCategory {PRODUCT, INFO; }  

Obviously, you do not need a processor plugin. Only the regular compiler works i

section, and it works fine ... go figure. My compiler configuration is:

  & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-compliant plugin & lt; / ArtifactId> & Lt; Version & gt; 3.1 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Source & gt; 1.8 & lt; / Source & gt; & Lt; Goal & gt; 1.8 & lt; / Target & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt;  

Comments