Mojo's OpenJPA Maven Plugin
  1. Mojo's OpenJPA Maven Plugin
  2. MOPENJPA-3

add a config property to specify a specific PersistenceUnit name

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0-alpha, 1.0
    • Fix Version/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Currently, it is not possible to explicitely define one PersistenceUnit which should be used for the maven mojos.

      in the ant based tasks this is done via:
      <value>META-INF/persistence.xml#OpenJpaTestPersistenceUnit</value>

        Activity

        Hide
        Adam Hardy added a comment -

        Obviously it would be nice to have a standard property to specify the persistence unit, and the persistence.xml file too I guess, but this config works fine for me with the current snapshot:

        <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>openjpa-maven-plugin</artifactId>
        <version>1.1-SNAPSHOT</version>
        <executions>
        <execution>
        <phase>process-classes</phase>
        <id>enhanceEntities</id>
        <goals>
        <goal>enhance</goal>
        </goals>
        <configuration>
        <classes>
        $

        {build.outputDirectory}/org/permacode/patternrepo/domain/entity
        </classes>
        <outputDirectory>${build.outputDirectory}

        </outputDirectory>
        <toolProperties>
        <property>
        <name>properties</name>
        <value>
        $

        {build.outputDirectory}

        /META-INF/persistence.xml#OpenJpaJdbc
        </value>
        </property>
        </toolProperties>
        </configuration>
        </execution>
        </executions>
        </plugin>

        Show
        Adam Hardy added a comment - Obviously it would be nice to have a standard property to specify the persistence unit, and the persistence.xml file too I guess, but this config works fine for me with the current snapshot: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>openjpa-maven-plugin</artifactId> <version>1.1-SNAPSHOT</version> <executions> <execution> <phase>process-classes</phase> <id>enhanceEntities</id> <goals> <goal>enhance</goal> </goals> <configuration> <classes> $ {build.outputDirectory}/org/permacode/patternrepo/domain/entity </classes> <outputDirectory>${build.outputDirectory} </outputDirectory> <toolProperties> <property> <name>properties</name> <value> $ {build.outputDirectory} /META-INF/persistence.xml#OpenJpaJdbc </value> </property> </toolProperties> </configuration> </execution> </executions> </plugin>
        Hide
        Mark Struberg added a comment -

        can most probably only be done by deeper integrating with openjpa PCEnhancer (which is currently not possible)

        Show
        Mark Struberg added a comment - can most probably only be done by deeper integrating with openjpa PCEnhancer (which is currently not possible)

          People

          • Assignee:
            Mark Struberg
            Reporter:
            Mark Struberg
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: