Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347494 - [mojo] openjpa-maven-plugin:enhance support
Summary: [mojo] openjpa-maven-plugin:enhance support
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-27 14:08 EDT by Jerry Carter CLA
Modified: 2021-04-19 13:25 EDT (History)
2 users (show)

See Also:


Attachments
OpenJPA Sample project (3.00 KB, application/zip)
2011-06-21 08:57 EDT, Michael Glauche CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jerry Carter CLA 2011-05-27 14:08:25 EDT
Build Identifier: 20110218-0911

OpenJPA requires bytecode modifications of the Java classes which are generated.  The openjpa-maven-plugin <http://openjpa.apache.org/enhancement-with-maven.html> takes care of this.

Reproducible: Always

Steps to Reproduce:
1. Create a pom.xml which attempts to use the openjpa-maven-plugin.
2. 
3.
Comment 1 Igor Fedorenko CLA 2011-05-27 14:27:12 EDT
Please attach complete standalone example that demonstrates openjpa-maven-plugin in action and steps see it actually works.

Also, do you know if there is existing eclipse tooling that supports bytecode modifications required by OpenJPA? It may make more sense to integrate m2e with that tooling (assuming it exists), than trying teach openjpa-maven-plugin and JDT builder play nicely together.
Comment 2 Jerry Carter CLA 2011-05-31 09:10:36 EDT
This worked fine in version 0.9.8.20090504141.
Comment 3 Igor Fedorenko CLA 2011-05-31 11:32:56 EDT
(In reply to comment #2)
> This worked fine in version 0.9.8.20090504141.

This does not give us enough information to understand how to support openjpa maven plugin in 0.13. Please provide standalone sample project, explain what is expected to happen with this project inside eclipse workspace and how we can verify this is actually happening (or not).
Comment 4 Michael Glauche CLA 2011-06-21 08:57:35 EDT
Created attachment 198331 [details]
OpenJPA Sample project

Attached is a small openjpa sample project. To confirm the project is working correctly just run mvn package, the look at the Book.class file. It should contain Strings like "org/apache/openjpa/enhance/PersistenceCapable", if not it was not enhanced. (Bytecode Enhancing is adding metadata to a POJO, like dirty handling, etc, so the persistence layer does know what did happen to it)

The expected behaviour would be that if the user does edit the Book.java entity and saves it, the class file should be automaticly enhanced.

Please note, that it is possible to specify inclusions and exclusion of files to specify when the plugin is triggered.

The complete documentation of the plugin can be found at http://mojo.codehaus.org/openjpa-maven-plugin/index.html

Please also note, the plugin is currently reaming itself, from org.codehaus.mojo to org.apache.openjpa, but the later did not release any non-snapshot version, so the attached example is for the stable org.codehaus version, which most people would proably use.
Comment 5 Igor Fedorenko CLA 2011-06-29 02:13:14 EDT
m2e core development team is looking for help implementing support for various "not covered" maven plugins. If you are interested, wiki [1] provides pointers where to start and we'll be happy to answer questions on m2e-dev mailing list. To avoid duplicate effort, please assign this bugzilla item to yourself if you already work on corresponding m2e extension.

[1] m2e extension development is documented in http://wiki.eclipse.org/M2E_Extension_Development
Comment 6 Harald Wellmann CLA 2011-07-15 11:17:09 EDT
An m2e extension for OpenJPA is available from the update site
https://github.com/hwellmann/m2eclipse-extras/raw/master/p2/

See https://github.com/hwellmann/m2eclipse-extras/wiki for more details.
Comment 7 Igor Fedorenko CLA 2013-09-28 23:34:27 EDT
closing as fixed as per last comment
Comment 8 Igor Fedorenko CLA 2013-09-28 23:34:58 EDT
actually, NOT_ECLIPSE is more appropriate
Comment 9 Denis Roy CLA 2021-04-19 13:25:44 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/