Plugin Documentation

Goals available for this plugin:

GoalReport?Description
oqt:reportYesThe QueryTranslatorReportingMojo creates the report from the output generated by the QueryTranslatorReportingMojo
oqt:translateNoThe QueryTranslatorBuildMojo is the mojo which will convert all the known JPQL queries to SQL queries.

This plugin will gather the following information from your ORM:

  • The list of entities per package
  • The list of named queries per entity
  • The list of SQL queries per named query
  • The list of erroneous queries.
oqt:validateNoThis mojo will only validate the JPQL queries.

A database connection is not required to run this plugin, a Derby database connection is automatically initalized (since Derby is supported by OpenJPA 1.0.0 to OpenJPA 2.2).

This plugin will make the build fail if not all JPQL queries are valid.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven2.0
JDK1.6
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>net.sf.oqt</groupId>
          <artifactId>oqt-maven-plugin</artifactId>
          <version>0.4-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>net.sf.oqt</groupId>
        <artifactId>oqt-maven-plugin</artifactId>
        <version>0.4-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
  <!-- To use the report goals in your POM or parent POM -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>net.sf.oqt</groupId>
        <artifactId>oqt-maven-plugin</artifactId>
        <version>0.4-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"