You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by bu...@apache.org on 2013/06/28 09:22:31 UTC

svn commit: r867702 - in /websites/staging/isis/trunk: cgi-bin/ content/ content/components/objectstores/jdo/datanucleus-and-maven.html

Author: buildbot
Date: Fri Jun 28 07:22:30 2013
New Revision: 867702

Log:
Staging update by buildbot for isis

Modified:
    websites/staging/isis/trunk/cgi-bin/   (props changed)
    websites/staging/isis/trunk/content/   (props changed)
    websites/staging/isis/trunk/content/components/objectstores/jdo/datanucleus-and-maven.html

Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Jun 28 07:22:30 2013
@@ -1 +1 @@
-1495931
+1497666

Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Jun 28 07:22:30 2013
@@ -1 +1 @@
-1495931
+1497666

Modified: websites/staging/isis/trunk/content/components/objectstores/jdo/datanucleus-and-maven.html
==============================================================================
--- websites/staging/isis/trunk/content/components/objectstores/jdo/datanucleus-and-maven.html (original)
+++ websites/staging/isis/trunk/content/components/objectstores/jdo/datanucleus-and-maven.html Fri Jun 28 07:22:30 2013
@@ -313,6 +313,67 @@ istered, and you are trying to register 
 ch.
 </pre>
 
+<h3>Preferred solution</h3>
+
+<blockquote>
+  <p>This solution fixes is now version of DataNucleus to be the version referenced by the JDO ObjectStore.  </p>
+  
+  <p>This is the solution used from the Isis Core 1.3.0-SNAPSHOT onwards.</p>
+</blockquote>
+
+<p>In the root project's <code>pom.xml</code>, specify the property:</p>
+
+<pre><code>&lt;properties&gt;
+    &lt;datanucleus-core.version&gt;3.2.4&lt;/datanucleus-core.version&gt;
+    ...
+&lt;/properties&gt;
+</code></pre>
+
+<p>where the version should be the same as the one referenced by the JDO Objectstore.</p>
+
+<p>Then, in the <code>dom</code> project's <code>pom.xml</code>, update the DataNucleus enhancer plugin to force it to use a specific version of the DataNucleus core: </p>
+
+<pre><code>&lt;plugins&gt;
+    &lt;plugin&gt;
+        &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
+        &lt;artifactId&gt;datanucleus-maven-plugin&lt;/artifactId&gt;
+        &lt;version&gt;3.2.0-release&lt;/version&gt;
+        &lt;dependencies&gt;
+            &lt;dependency&gt;
+                    &lt;!-- Force the enhancer to use the same version 
+                    of core that's already on the classpath --&gt;
+                    &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
+                    &lt;artifactId&gt;datanucleus-core&lt;/artifactId&gt;
+                    &lt;version&gt;${datanucleus-core.version}&lt;/version&gt;
+                &lt;/dependency&gt;
+            &lt;/dependencies&gt;
+            &lt;configuration&gt;
+            &lt;fork&gt;false&lt;/fork&gt;
+            &lt;log4jConfiguration&gt;${basedir}/log4j.properties&lt;/log4jConfiguration&gt;
+            &lt;verbose&gt;true&lt;/verbose&gt;
+            &lt;props&gt;${basedir}/datanucleus.properties&lt;/props&gt;
+        &lt;/configuration&gt;
+        &lt;executions&gt;
+            &lt;execution&gt;
+                &lt;phase&gt;compile&lt;/phase&gt;
+                &lt;goals&gt;
+                    &lt;goal&gt;enhance&lt;/goal&gt;
+                &lt;/goals&gt;
+            &lt;/execution&gt;
+        &lt;/executions&gt;
+    &lt;/plugin&gt;
+   ...
+&lt;/plugins&gt;
+</code></pre>
+
+<h3>Original solution</h3>
+
+<blockquote>
+  <p>This solution attempts to use the latest-n-greatest version of DataNucleus, and was the approach used in Isis Core 1.2.0 and earlier.  However, it has been found to be flawed if a new version of the DataNucleus enhancer was released that had an incompatibility with the version of DN referenced by the JDO ObjectStore.  </p>
+  
+  <p>Use the preferred solution, above, instead.</p>
+</blockquote>
+
 <p>The fix is to use a Maven profile.  The following is correct as of the JDO ObjectStore v1.1.0:</p>
 
 <pre>