OpenJPA
  1. OpenJPA
  2. OPENJPA-2409

allow the openjpa-maven-plugin to use a persistence.xml from resources and not only from files

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.3.0
    • Component/s: tooling
    • Labels:
      None
    1. OPENJPA-2409.patch
      8 kB
      Romain Manni-Bucau

      Activity

      Hide
      Romain Manni-Bucau added a comment -

      A patch handling it with the following strategy:
      1) if the persistence.xml exists -> nothing
      2) else try in TCCL, if found -> use it
      3) else try in compiler artifacts
      3) else try in runtime artifacts

      When found the persistence.xml is copied in target/openjpa-work to ensure it is a File.

      Show
      Romain Manni-Bucau added a comment - A patch handling it with the following strategy: 1) if the persistence.xml exists -> nothing 2) else try in TCCL, if found -> use it 3) else try in compiler artifacts 3) else try in runtime artifacts When found the persistence.xml is copied in target/openjpa-work to ensure it is a File.
      Hide
      Mark Struberg added a comment -

      sounds great, will look at the patch in the afternoon and apply it if it works.

      Show
      Mark Struberg added a comment - sounds great, will look at the patch in the afternoon and apply it if it works.
      Hide
      Romain Manni-Bucau added a comment -

      just saw the workDir field i added uses @parameter expression="$

      {openjpa.classes}

      " instead of @parameter expression="$

      {openjpa.workDir}

      ". I can't fix the patch right but i'll do later if it is needed

      Show
      Romain Manni-Bucau added a comment - just saw the workDir field i added uses @parameter expression="$ {openjpa.classes} " instead of @parameter expression="$ {openjpa.workDir} ". I can't fix the patch right but i'll do later if it is needed
      Hide
      ASF subversion and git services added a comment -

      Commit 1533462 from Mark Struberg in branch 'openjpa/branches/2.3.x'
      [ https://svn.apache.org/r1533462 ]

      OPENJPA-2409 enable persistenceXmlFile parameter to handle classpath resources as well.

      contributed by rmannibucau, txs!
      applied with small changes and doc improvements

      Show
      ASF subversion and git services added a comment - Commit 1533462 from Mark Struberg in branch 'openjpa/branches/2.3.x' [ https://svn.apache.org/r1533462 ] OPENJPA-2409 enable persistenceXmlFile parameter to handle classpath resources as well. contributed by rmannibucau, txs! applied with small changes and doc improvements
      Hide
      ASF subversion and git services added a comment -

      Commit 1533466 from Mark Struberg in branch 'openjpa/trunk'
      [ https://svn.apache.org/r1533466 ]

      OPENJPA-2409 enable persistenceXmlFile parameter to handle classpath resources as well.

      contributed by rmannibucau, txs!
      applied with small changes and doc improvements

      Show
      ASF subversion and git services added a comment - Commit 1533466 from Mark Struberg in branch 'openjpa/trunk' [ https://svn.apache.org/r1533466 ] OPENJPA-2409 enable persistenceXmlFile parameter to handle classpath resources as well. contributed by rmannibucau, txs! applied with small changes and doc improvements
      Hide
      Mark Struberg added a comment -

      also applied to trunk.

      Show
      Mark Struberg added a comment - also applied to trunk.

        People

        • Assignee:
          Mark Struberg
          Reporter:
          Romain Manni-Bucau
        • Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development