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 2012/12/06 17:31:40 UTC
svn commit: r840966 - in /websites/staging/isis/trunk: cgi-bin/ content/
content/components/objectstores/jdo/hints-and-tips.html
Author: buildbot
Date: Thu Dec 6 16:31:39 2012
New Revision: 840966
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/hints-and-tips.html
Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Dec 6 16:31:39 2012
@@ -1 +1 @@
-1416681
+1417986
Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Dec 6 16:31:39 2012
@@ -1 +1 @@
-1416681
+1417986
Modified: websites/staging/isis/trunk/content/components/objectstores/jdo/hints-and-tips.html
==============================================================================
--- websites/staging/isis/trunk/content/components/objectstores/jdo/hints-and-tips.html (original)
+++ websites/staging/isis/trunk/content/components/objectstores/jdo/hints-and-tips.html Thu Dec 6 16:31:39 2012
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
- <title>Using JDO in Maven and Eclipse
</title>
+ <title>Using JDO in Maven and Eclipse</title>
<meta name="description" content="">
<meta name="author" content="">
@@ -105,7 +105,7 @@
};
function twshare () {
window.open(
- "https://twitter.com/intent/tweet?url="+document.URL+"&text=Using JDO in Maven and Eclipse
",
+ "https://twitter.com/intent/tweet?url="+document.URL+"&text=Using JDO in Maven and Eclipse",
'Share on Twitter',
'width=800,height=526');
};
@@ -179,7 +179,7 @@
<div class="page-header">
<p><a href="./../../../documentation.html">Docs</a> » <a href="./../../../components/about.html">Components</a> » <a href="./../../../components/objectstores/about.html">Objectstores</a> » <a href="./../../../components/objectstores/jdo/about.html">Jdo</a></p>
-<h1>Using JDO in Maven and Eclipse
+<h1>Using JDO in Maven and Eclipse
</h1>
</div>
@@ -249,11 +249,65 @@
<p>The Eclipse DataNucleus plugin on the other hand is configured to use the project classpath, and so it will remain compatible with the version referenced by Isis' own JDO objectstore.</p>
-<p>Unfortunately, if the enhancer is run referencing two different versions of the <code>org.datanucleus:dataducleus-core</code> jar, then it will fail.</p>
+<p>Unfortunately, if the enhancer is run referencing two different versions of the <code>org.datanucleus:dataducleus-core</code> jar, then it will fail:</p>
+
+<pre>
+[INFO] Example Claims .................................... SUCCESS [0.017s]
+[INFO] Example Claims App DOM ............................ FAILURE [1.532s]
+[INFO] Example Claims App Repositories (for ObjectStore Default) SKIPPED
+[INFO] Example Claims App Fixtures ....................... SKIPPED
+[INFO] Example Claims App Repositories (for JDO ObjectStore) SKIPPED
+...
+...
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD FAILURE
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 5:49.374s
+[INFO] Finished at: Thu Dec 06 15:54:44 GMT 2012
+[INFO] Final Memory: 113M/883M
+[INFO] ------------------------------------------------------------------------
+[ERROR] Failed to execute goal org.datanucleus:maven-datanucleus-plugin:3.1.1:en
+hance (default) on project claims-dom: Error executing DataNucleus tool org.data
+nucleus.enhancer.DataNucleusEnhancer: InvocationTargetException: Plugin (Bundle)
+ "org.datanucleus" is already registered. Ensure you dont have multiple JAR vers
+ions of the same plugin in the classpath. The URL "file:/C:/MVN/.m2/repository/o
+rg/datanucleus/datanucleus-core/3.1.3/datanucleus-core-3.1.3.jar" is already reg
+istered, and you are trying to register an identical plugin located at URL "file
+:/C:/MVN/.m2/repository/org/datanucleus/datanucleus-core/3.1.2/datanucleus-core-
+3.1.2.jar." -> [Help 1]
+[ERROR]
+[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
+ch.
+</pre>
<p>The fix is to use a Maven profile:</p>
-<p><img src="resources/eclipse-300-range-incompatibilities.png"/></p>
+<pre>
+ <profiles>
+ <profile>
+ <id>not-m2e</id>
+ <activation>
+ <property>
+ <name>!m2e.version</name>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-core</artifactId>
+ <version>(3.0.99, 3.1.99)</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-enhancer</artifactId>
+ <version>(3.0.99, 3.1.99)</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+</pre>
<p>This says that when <em>not</em> run within Eclipse (the ${m2e.version} property is <em>not</em> set), then to use the latest version of the DataNucleus dependency can be referenced. You can maintain the <version> to keep track with the latest-n-greatest available in the Maven repo.</p>