简体   繁体   English

数据核jdo 3.1.2迁移到4.x

[英]datanucleus jdo 3.1.2 migrate to 4.x

We build and run a jdo app both on J2EE Servers and Google App Engine. 我们在J2EE服务器和Google App Engine上都构建并运行一个jdo应用程序。 We seem stuck on datanucleus 3.1.2 though and when I try to upgrade our maven configs to 4.1 I always get classpath or compile errors. 但是,我们似乎停留在数据核3.1.2上,当我尝试将maven配置升级到4.1时,总是会收到类路径或编译错误。

I'm hoping to get some migration help. 我希望获得一些迁移帮助。 My maven pom.xml is below, what do i need to change to get onto 4.x? 我的maven pom.xml在下面,我需要更改才能进入4.x? It seems that just switching to the latest versions doesn't work. 似乎仅切换到最新版本是行不通的。 The version combination below works just fine. 下面的版本组合可以正常工作。 What is the 4.x equivalent? 什么是4.x等效项? thanks! 谢谢!

 <dependency>
        <groupId>javax.jdo</groupId>
        <artifactId>jdo-api</artifactId>
        <version>3.0.1</version>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-core</artifactId>
        <version>3.1.1</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-api-jdo</artifactId>
        <version>3.1.2</version>

    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-rdbms</artifactId>
        <version>3.1.2</version>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-cache</artifactId>
        <version>3.1.2</version>
    </dependency>


 <plugin>
                <groupId>org.datanucleus</groupId>
                <artifactId>maven-datanucleus-plugin</artifactId>
                <version>3.1.2</version>
                <configuration>
                    <verbose>false</verbose>
                    <fork>false</fork>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>enhance</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

If using RDBMS (and not Google AppEngine) then you upgrade all jars to the latest from 4.0 or 4.1 or 4.2 depending on what version you intend to use. 如果使用RDBMS(而非Google AppEngine),则根据要使用的版本,将所有jar从4.0或4.1或4.2升级到最新版本。 That's all there is, and follow the DataNucleus projects migration guide of course. 这就是全部,当然请遵循DataNucleus项目迁移指南 You don't state what your compilation/classpath errors are so have to assume you haven't done it right or as per the documentation of those versions of DataNucleus 您没有说明您的编译/类路径错误是什么,因此必须假设您没有正确执行,或者根据那些版本的DataNucleus的文档进行操作

If using Google AppEngine, then you can't, since Google haven't provided updates to their persistence software that uses some of DataNucleus code. 如果使用Google AppEngine,那么您就不能这样做,因为Google尚未提供使用某些DataNucleus代码的持久性软件的更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM