Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: No Testcase No Testcase
Assignee: Unassigned
Reporter: Andy Glick
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
DataNucleus Tools : Maven plugin

Found an issue with the datanucleus-accessplatform-jpa-rdbms 3.3.4 release - when used with the datanucleus-maven-plugin 3.3.0-release the plugin fails with a linkage error

Created: 24/Nov/13 03:20 PM   Updated: 05/Dec/13 12:07 PM   Resolved: 05/Dec/13 12:07 PM
Component/s: Enhancer
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. XML File bug-report-pom.xml (16 kB)

Environment: windows 7 - jdk 1.7.0_25

Severity: Production

 Description  « Hide
When using a standard pom using the 3.3.4 version of datanucleus-accessplatform-jpa-rdbms and thje 3.3.0 version of the datanucleus-maven-plugin the build failed consistently failed in the process-classes phase.

the jpa rdbms has an dependency on datanucleus-core 3.2.9, the plugin has a dependency on datanucleus-core 3.2.8

I was able to get the plugin to work with the new release when I changed the datanucleus-core dependency in its pom file to 3.2.9. So if you modified the plugin's pom and changed the version you could make a new release of the plugin which ought to fix the problem.

[INFO] +- org.datanucleus:datanucleus-accessplatform-jpa-rdbms:pom:3.3.4:compile
[INFO] | +- org.datanucleus:datanucleus-core:jar:3.2.9:compile

The maven plugin has a dependency on


Wrote a standard pom (attached as the test case) The pom references



Executing the process-classes phase produced the following error messages:

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ datanucleus-story ---
[INFO] Nothing to compile - all classes are up to date
[INFO] --- datanucleus-maven-plugin:3.3.0-release:enhance (default) @ datanucleus-story ---
[ERROR] --------------------
[ERROR] Standard error from the DataNucleus tool + org.datanucleus.enhancer.DataNucleusEnhancer :
[ERROR] --------------------
[ERROR] Exception in thread "main" Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL "file:/C:/maven-repo/org/datanucleus/datanucleus-core/3.2.8/datanucleus-core-3.2.8.jar" is already registered, and you are trying to register an identical plugin located at URL "file:/C:/maven-repo/org/datanucleus/datanucleus-core/3.2.9/datanucleus-core-3.2.9.jar."
org.datanucleus.exceptions.NucleusException: Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL "file:/C:/maven-repo/org/datanucleus/datanucleus-core/3.2.8/datanucleus-core-3.2.8.jar" is already registered, and you are trying to register an identical plugin located at URL "file:/C:/maven-repo/org/datanucleus/datanucleus-core/3.2.9/datanucleus-core-3.2.9.jar."
at org.datanucleus.plugin.NonManagedPluginRegistry.registerBundle(
at org.datanucleus.plugin.NonManagedPluginRegistry.registerBundle(
at org.datanucleus.plugin.NonManagedPluginRegistry.registerExtensions(
at org.datanucleus.plugin.NonManagedPluginRegistry.registerExtensionPoints(
at org.datanucleus.plugin.PluginManager.<init>(
at org.datanucleus.plugin.PluginManager.createPluginManager(
at org.datanucleus.NucleusContext.<init>(
at org.datanucleus.NucleusContext.<init>(
at org.datanucleus.enhancer.DataNucleusEnhancer.<init>(
at org.datanucleus.enhancer.DataNucleusEnhancer.main(

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 24/Nov/13 03:27 PM
Well actually the datanucleus-maven-plugin has
            <version>[3.2.0.release, )</version>

so Maven is responsible for finding the most recent release of datanucleus-core. That is clearly 3.2.9

Andy Glick added a comment - 24/Nov/13 03:28 PM
the pom had a parent, I used help:effective pom to create a new pom which ought to be self sufficient. If there are issues using this pom file please send me an email message and I will make an effort to create one that is issue free.

Alternatively, you could use a pom with the jpa rdbms component's version set to 3.3.4 and a plugin whose version was 3.3.0-release

Andy Jefferson added a comment - 24/Nov/13 03:35 PM
No idea what your "parent pom" comment means. The datanucleus-maven-plugin is present in SVN trunk. If you have a problem with that then demonstrate your problem, or provide a patch to SVN trunk of that plugin with a description of why your patch is necessary (under what situation - so then someone else can see it).

Andy Jefferson added a comment - 05/Dec/13 12:07 PM
No way of reproduction provided. Stating what other people have done when faced with the *Maven* problem of a plugin using one version and their project using another version ... specify the <dependencies> section under the plugin itself to clarify which version.

v3.3.1 leaves it to the user to provide all datanucleus-xxx jars