开发者

Maven GAE Plugin using JDO

I'm using Maven GAE plugin with JDO, I started with jappstart example (https://github.com/tleese22/google-app-engine-jappstart/blob/master/pom.xml), but for some reason classes are not enhanced when I run gae:run command, even I have configured enhancement.

<plugin>
    <groupId>org.datanucleus</groupId>
    <artifactId>maven-datanucleus-plugin</artifactId>
    <version>1.1.4</version>
    <configuration开发者_如何学C>
        <mappingIncludes>**/jdo/*.class</mappingIncludes>
        <verbose>true</verbose>
        <enhancerName>ASM</enhancerName>
        <api>JDO</api>
    </configuration>
    <executions>
        <execution>                     
            <phase>compile</phase>                      
            <goals>
                <goal>enhance</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-core</artifactId>
            <version>${datanucleus.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>transaction-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-rdbms</artifactId>
            <version>${datanucleus.version}</version>
        </dependency>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-enhancer</artifactId>
            <version>1.1.4</version>
        </dependency>
        <dependency>
            <groupId>javax.jdo</groupId>
            <artifactId>jdo2-api</artifactId>
            <version>2.3-ec</version>
        </dependency>
    </dependencies>
</plugin>

Exception:

javax.jdo.JDOUserException: Persistent class "Class com.my.Entity does not seem to have been enhanced.  You may want to rerun the enhancer and check for errors in the output." has no table in the database, but the operation requires it. Please check the specification of the MetaData for this class.


I had something wrong with my mappings includes. Now it works if entities are in package that has last name entity (example com.my.app.entity):

<mappingIncludes>**/entity/*.class</mappingIncludes>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜