<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Ivan,<br>
    <br>
    I am not sure this is enough. How can you assure that no compilation
    errors would occur when @Entity or any other JPA-related class is
    used?<br>
    <br>
    Best Regards,<br>
    <br>
    George Gastaldi<br>
    <br>
    <div class="moz-cite-prefix">On 07/06/2015 05:02 PM, Ivan St. Ivanov
      wrote:<br>
    </div>
    <blockquote
cite="mid:CACYLA9G8c7kVrO_ikt=Lu4TVkWYns9opMYueX5hppDdF9cEDFg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi everybody,
        <div><br>
        </div>
        <div>I am working on a project that is not mainstream Java EE.
          Its target is Tomcat, but it uses JPA 2.0 (Eclipselink). I
          have tailored the dependencies in the pom.xml as well as the
          persistence.xml.</div>
        <div><br>
        </div>
        <div>And now I want to use Forge to add some fields to the
          existing entities. What I noticed is that when I run the
          jpa-new-field command for the first time, it also installs the
          JPA facet. Which in turns adds some unwanted dependencies to
          my pom.xml and completely overwrites persistence.xml.</div>
        <div><br>
        </div>
        <div>I dig into the code and found that the isInstalled method
          of the JPA Facet returns true when persistence.xml file does
          not exist and when pom.xml does not contain some dependencies.
          These dependencies are different for JPA 2.0 and 2.1, but are
          basically Hibernate JPA API and the Java EE API.</div>
        <div><br>
        </div>
        <div>As a result of this, projects that don't target Java EE or
          that use different artifacts for it or for JPA are going to
          get their poms polluted and their persistence.xml files
          overwritten.</div>
        <div><br>
        </div>
        <div>So my proposal is to change the isInstalled method to only
          check for the presence of persistence.xml. What do you think?</div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div>Ivan</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
forge-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/forge-dev">https://lists.jboss.org/mailman/listinfo/forge-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>