title: How to configure JPAMetaModelEntityProcessor to not get "Duplicate class" error?
body: <p>I am trying to use the hibernate-jpamodelgen in conjunction with the <a href="https://maven-annotation-plugin.googlecode.com/svn/docs/usage.html" rel="nofollow noreferrer">maven-processor-plugin</a> to generate my JPA meta-model as part of my Maven build using the configuration <a href="https://stackoverflow.com/a/11245730/254477">from this answer</a>.</p>
  
  <p>However, when I do the build I get the following error when I try to do a <code>mvn clean install</code>:</p>
  
  <pre><code>[ERROR] C:\Users\ArtB\Documents\code\xxx\target\classes\me\Page_.java:[11,16] error: duplicate class: me.Page_  
  </code></pre>
  
  <p>From some investigation it looks like the issue is that the generated meta-model seems to occur twice or something.</p>
  
  <p>If I run <code>clear; mvn clean generate-sources; ls -l target\generated-sources\apt\me</code> I have just the file <code>_Page.java</code>and no other files.</p>
  
  <p>After the <code>compile</code> phase the <code>target\classes\</code> folder just contains <code>\me\_Page.java</code> ... which seems strange since I thought <code>.class</code> files should appear in the "\target\classes" folder.</p>
  
  <p>I ran the build with debug (ie <code>-X</code>) and saw nothing suspicious.</p>
  
  <hr>
  
  <p>I doubt it matters, but here are my models.</p>
  
  <pre><code>package me;
  
  @Entity
  @Table(name="Pages")
  public class Page {
  
      @Id @GeneratedValue
      private long id;
  
      private String title;
      private Instant lastRetrieved;
      private PageCategory category;
      private URL source;
  
      @Lob
      private String contents;
  
      //hashcode, equals, getters &amp; setters omitted
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>package me;
  
  public enum PageCategory {
      PRODUCT,
      INFO
      ;
  }
  </code></pre>