Groovy 如何在DataNucleus JDO实现中为类型安全查询系统生成QFO类?

Groovy 如何在DataNucleus JDO实现中为类型安全查询系统生成QFO类?,groovy,code-generation,jdo,datanucleus,Groovy,Code Generation,Jdo,Datanucleus,我创建了一个名为域的maven模块。在这个模块中,我用Groovy编写了数据库的所有实体类。直到出现此问题之前,此配置一直运行良好 根据,我已经设置了maven pom,如下所示。我的实体类增强得很好,我可以将它们用于所有常规的老式查询API。但是,我没有像文档声明那样为我创建QProduct样式的代码生成类。有人知道我要做什么才能生成这些类吗 编辑:我忘了提到我只在盒子上安装了1.6JDK,我在Maven上为1.6源和目标设置了必要的位 <dependencies>

我创建了一个名为域的maven模块。在这个模块中,我用Groovy编写了数据库的所有实体类。直到出现此问题之前,此配置一直运行良好

根据,我已经设置了maven pom,如下所示。我的实体类增强得很好,我可以将它们用于所有常规的老式查询API。但是,我没有像文档声明那样为我创建QProduct样式的代码生成类。有人知道我要做什么才能生成这些类吗

编辑:我忘了提到我只在盒子上安装了1.6JDK,我在Maven上为1.6源和目标设置了必要的位

    <dependencies>
        <!-- JDO Dependencies -->
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-core</artifactId>
            <version>[2.9, )</version>
        </dependency>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-api-jdo</artifactId>
            <version>[2.9, )</version>
        </dependency>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-jdo-query</artifactId>
            <version>[2.9, )</version>
        </dependency>
        <dependency>
            <groupId>javax.jdo</groupId>
            <artifactId>jdo-api</artifactId>
            <version>[3.0, 4.0)</version>
        </dependency>
   </dependencies>

    <build>
        <sourceDirectory>src/main/groovy</sourceDirectory>
        <plugins>
            <!-- This plugin does compile time enhancement of the entity classes using
                 bytecode weaving -->
            <plugin>
                <groupId>org.datanucleus</groupId>
                <artifactId>maven-datanucleus-plugin</artifactId>
                <version>3.0.0-release</version>
                <configuration>
                    <metadataIncludes>**/entities/*.class</metadataIncludes>
                    <generateConstructor>true</generateConstructor>
                    <enhancerName>ASM</enhancerName>
                    <quiet>true</quiet>
                    <verbose>false</verbose>
                </configuration>
                <executions>
                    <execution>
                        <id>enhance-classes</id>
                        <goals>
                            <goal>enhance</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

org.datanucleus
数据核核心
[2.9, )
org.datanucleus
datanucleus api jdo
[2.9, )
org.datanucleus
datanucleus jdo查询
[2.9, )
javax.jdo
jdoapi
[3.0, 4.0)
src/main/groovy
org.datanucleus
maven datanucleus插件
3.0.0版本
**/实体/*.class
真的
ASM
真的
假的
强化课程
增强

使用JDK1.6+,因为这将调用在类路径中找到的任何注释处理器。适用于其他所有人。与“maven datanucleus插件”无关。“Q”类只是编译步骤的一部分(或更好的“预编译”)

我使用的是JDK 1.6,这应该不会有问题。当然,但是有一个项目演示了这一切,并且它是有效的,因此我会用它来找出你有什么不同