Hi folks,

I've just implemented ISIS-646, which is to upgrade the JDO objectstore to
use the latest-n-greatest version of DataNucleus, currently 3.3.6.

This new DN version upgrades JDO API to 3.1. (from 3.0).

It also allows us to remove a hack to the DN enhancer plugin for maven, as
documented in [1].  The DN enhancer now uses the "provided" version of DN,
so it is no longer necessary to force the version of DN used by it.

At the same time, I've also changed to use the convenience "access
platform" modules, rather than the underlying components.  For example, as
you can see from its pom [2], DN 3.3.6 actually consists of dn-core 3.2.11,
dn-rdbms 3.2.10, etc.

What all the above means, though, is some changes to existing project poms.
 Basically they get simpler.

*in parent project:*

    <properties>

        <!-- must be consistent with the versions defined by the JDO
Objectstore -->
        <datanucleus-core.version>3.2.7</datanucleus-core.version>
        <jdo-api.version>3.0.1</jdo-api.version>
        ...

    </properties>

*changed to:*

    <properties>

        <!-- must be consistent with the version defined by the JDO
Objectstore -->

<datanucleus-maven-plugin.version>3.3.2</datanucleus-maven-plugin.version>

        ...

    </properties>


*in the dom project:*

            <plugin>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-maven-plugin</artifactId>
                <version>3.2.0-release</version>
                <dependencies>
                    <dependency>
                        <!-- Force the enhancer to use the same version of
core as the JDO objectstore -->
                        <groupId>org.datanucleus</groupId>
                        <artifactId>datanucleus-core</artifactId>
                        <version>${datanucleus-core.version}</version>
                    </dependency>
                    <dependency>
                        <!-- Force the enhancer to use the same version of
jdo-api as the JDO objectstore -->
                        <groupId>javax.jdo</groupId>
                        <artifactId>jdo-api</artifactId>
                        <version>${jdo-api.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    ...
                </configuration>
                <executions>
                    ...
                </executions>
            </plugin>


*simplified to:*

            <plugin>
                <groupId>org.datanucleus</groupId>
                <artifactId>datanucleus-maven-plugin</artifactId>
                <version>${datanucleus-maven-plugin.version}</version>
                <configuration>
                    ...
                </configuration>
                <executions>
                    ...
                </executions>
            </plugin>


*and also in the dom project*


                        <plugins>
                <!--This plugin's configuration is used to store Eclipse
m2e settings only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.datanucleus
                                        </groupId>
                                        <artifactId>
                                            datanucleus-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [3.2.0-release,)
                                        </versionRange>
                                        <goals>
                                            <goal>enhance</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>

*changed the <versionRange> tag to:*


<versionRange>[${datanucleus-maven-plugin.version},)</versionRange>


~~~

When v1.4.0 is released (sometime soon-ish), I'll make sure these
instructions are in the release notes.  And the archetypes will be updated,
of course, to "just work" according to this new configuration.

~~~

Finally, just to note: in doing this upgrade, I uncovered a bug in
DataNucleus.  Previously although it was possible to add
defaultFetchGroup="true" (ie eager loading) for collecitons, this was
ignored.

In this new version of DN, this has now been implemented, but incorrectly,
unfortunately.  It's possible to disable the behaviour, which I've done in
Isis (so there's no impact on any domain code).  The DN bug is raised at
[3], and I've raised a further ticket on Isis [4] to a backout the
workaround once the DN fix is implemented.


Any questions, please ask here.

Thx
Dan



[1]
http://isis.apache.org/components/objectstores/jdo/datanucleus-and-maven.html
[2]
http://search.maven.org/remotecontent?filepath=org/datanucleus/datanucleus-accessplatform-jdo-rdbms/3.3.6/datanucleus-accessplatform-jdo-rdbms-3.3.6.pom

[3] http://www.datanucleus.org/servlet/jira/browse/NUCCORE-1103
[4] https://issues.apache.org/jira/browse/ISIS-647

Reply via email to