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
& Lt; Version & gt; 2.2.4 & lt; / Edition & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Process & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Process & lt; / Target & gt; & Lt; / Targets & gt; & Lt; Step & gt; Generating sources & lt; / Step & gt; & Lt; Configuration & gt; & Lt; Processor & gt; & Lt; Processor & gt; Org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor & lt; / Processor & gt; & Lt; / Processor & gt; & Lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; Dependency & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.hibernate & lt; / Group & gt; & Lt; ArtifactId & gt; Hibernate-jpamodelgen & lt; / ArtifactId> & Lt; Version & gt; 4.3.6.Final & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; / Dependencies & gt; & Lt; / Plugin & gt; - & gt;
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
Post a Comment