You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Jerry Carter <je...@jerrycarter.org> on 2011/11/15 20:33:40 UTC
Best approach for performing OpenJPA enhancement in Eclipse Indigo
I'm in the process of updating my development environment. Anyone currently having Eclipse automatically perform enhancements? I'd love to compare notes.
I see four routes:
(1) Custom ANT builder, as per <http://openjpa.apache.org/enhancement-with-eclipse.html>
- Quite a few steps and needs to be done for each project.
(2) OpenJPA plugin for Eclipse, as per <http://openjpa.apache.org/enhancement-with-eclipse.html>
- This looks dead, very dead.
(3) From Maven using the openjpa-maven-plugin, as per <http://openjpa.apache.org/enhancement-with-maven.html>
- Possibly dead, or at least very quiet.
- Does not appear to work in Indigo even with <https://github.com/hwellmann/m2eclipse-extras/wiki>
(4) From Maven using the maven-antrun-plugin, as per <http://openjpa.apache.org/enhancement-with-maven.html>
Did I miss anything? Any preferred approaches?
Thanks much.
-=- Jerry
RE: Best approach for performing OpenJPA enhancement in Eclipse
Indigo
Posted by Henno Vermeulen <he...@huizemolenaar.nl>.
We also run with the javaagent during development and use the openjpa-maven-plugin for creating deployable builds.
Henno
-----Oorspronkelijk bericht-----
Van: Rick Curtis [mailto:curtisr7@gmail.com]
Verzonden: dinsdag 15 november 2011 20:56
Aan: users@openjpa.apache.org
Onderwerp: Re: Best approach for performing OpenJPA enhancement in Eclipse Indigo
Jerry -
I use two approaches for Entity enhancement. When running / developing unit
tests in Eclipse, I run with the -javaagent enhancer[1]. This is nice for
quick development and works for a majority of cases. Then when I build from
the command line, we (OpenJPA) drop of out maven into ant[2][3], using the
maven-antrun-plugin to enhance our Entities.
Thanks,
Rick
[1] http://openjpa.apache.org/runtime-enhancement.html
[2] http://openjpa.apache.org/enhancement-with-ant.html
[3]
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml?view=markup
On Tue, Nov 15, 2011 at 1:33 PM, Jerry Carter <je...@jerrycarter.org> wrote:
>
> I'm in the process of updating my development environment. Anyone
> currently having Eclipse automatically perform enhancements? I'd love to
> compare notes.
>
> I see four routes:
>
> (1) Custom ANT builder, as per <
> http://openjpa.apache.org/enhancement-with-eclipse.html>
> - Quite a few steps and needs to be done for each project.
>
> (2) OpenJPA plugin for Eclipse, as per <
> http://openjpa.apache.org/enhancement-with-eclipse.html>
> - This looks dead, very dead.
>
> (3) From Maven using the openjpa-maven-plugin, as per <
> http://openjpa.apache.org/enhancement-with-maven.html>
> - Possibly dead, or at least very quiet.
> - Does not appear to work in Indigo even with <
> https://github.com/hwellmann/m2eclipse-extras/wiki>
>
> (4) From Maven using the maven-antrun-plugin, as per <
> http://openjpa.apache.org/enhancement-with-maven.html>
>
> Did I miss anything? Any preferred approaches?
>
> Thanks much.
>
> -=- Jerry
--
*Rick Curtis*
Re: Best approach for performing OpenJPA enhancement in Eclipse Indigo
Posted by Rick Curtis <cu...@gmail.com>.
Jerry -
I use two approaches for Entity enhancement. When running / developing unit
tests in Eclipse, I run with the -javaagent enhancer[1]. This is nice for
quick development and works for a majority of cases. Then when I build from
the command line, we (OpenJPA) drop of out maven into ant[2][3], using the
maven-antrun-plugin to enhance our Entities.
Thanks,
Rick
[1] http://openjpa.apache.org/runtime-enhancement.html
[2] http://openjpa.apache.org/enhancement-with-ant.html
[3]
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml?view=markup
On Tue, Nov 15, 2011 at 1:33 PM, Jerry Carter <je...@jerrycarter.org> wrote:
>
> I'm in the process of updating my development environment. Anyone
> currently having Eclipse automatically perform enhancements? I'd love to
> compare notes.
>
> I see four routes:
>
> (1) Custom ANT builder, as per <
> http://openjpa.apache.org/enhancement-with-eclipse.html>
> - Quite a few steps and needs to be done for each project.
>
> (2) OpenJPA plugin for Eclipse, as per <
> http://openjpa.apache.org/enhancement-with-eclipse.html>
> - This looks dead, very dead.
>
> (3) From Maven using the openjpa-maven-plugin, as per <
> http://openjpa.apache.org/enhancement-with-maven.html>
> - Possibly dead, or at least very quiet.
> - Does not appear to work in Indigo even with <
> https://github.com/hwellmann/m2eclipse-extras/wiki>
>
> (4) From Maven using the maven-antrun-plugin, as per <
> http://openjpa.apache.org/enhancement-with-maven.html>
>
> Did I miss anything? Any preferred approaches?
>
> Thanks much.
>
> -=- Jerry
--
*Rick Curtis*
Re: Best approach for performing OpenJPA enhancement in Eclipse Indigo
Posted by Harald Wellmann <hw...@googlemail.com>.
Hi Rick,
I think there's some misunderstanding... Your links seem to refer to the
OpenJPA Eclipse plugin
http://openjpa.apache.org/openjpaeclipseinstallation.html
which I've never used, and I don't think I could be of much help with that.
My m2e Extension for OpenJPA depends on Maven, the openjpa-maven-plugin,
and the Maven Eclipse integration m2e 1.0.
This assumes you build your projects with Maven and you have properly
configured the openjpa-maven-plugin for build-time enhancement in your POM.
Now when importing your Maven project into Eclipse, without the m2e
Extension, Eclipse (not Maven) will recompile an entity class whenever
you change and save the source file in the IDE, and this class will be
unenhanced by default.
The m2e extension intercepts build events coming from Eclipse and then
makes m2e invoke the appropriate Maven goal (openjpa:enhance in this
case) to postprocess the classes compiled by Eclipse.
I'm not an expert on m2e, so this is currently nothing but a "works for
me" solution.
Any feedback is welcome, to help improve this extension, should there be
any problems in other environments.
Best regards,
Harald
Am 16.11.2011 16:24, schrieb Rick Curtis:
> Harold -
>
> Your setup is perfectly valid and if it works for you, great! OpenJPA uses
> build time enhancement as we have lots of automated builds that don't see
> the light of Eclipse and as such what we have works good enough...
>
> Now if you're looking to help contribute to problems with the enhancer
> plugin, we'd be more than willing to have some help! There are a number of
> JIRAs that have been opened for problems with the existing implementation.
> I'll paste a few links that contain interesting information about the
> development / problems of the eclipse plugin.
>
> Thanks,
> Rick
Re: Best approach for performing OpenJPA enhancement in Eclipse Indigo
Posted by Rick Curtis <cu...@gmail.com>.
Harold -
Your setup is perfectly valid and if it works for you, great! OpenJPA uses
build time enhancement as we have lots of automated builds that don't see
the light of Eclipse and as such what we have works good enough...
Now if you're looking to help contribute to problems with the enhancer
plugin, we'd be more than willing to have some help! There are a number of
JIRAs that have been opened for problems with the existing implementation.
I'll paste a few links that contain interesting information about the
development / problems of the eclipse plugin.
Thanks,
Rick
https://issues.apache.org/jira/browse/OPENJPA-1412 -- This one also links
to a number of other JIRAs.
http://markmail.org/thread/htxerfi42f76xtzi -- The net of this exchange is
that he had issues on Eclipse 3.6, I think things worked properly before
that.?
On Wed, Nov 16, 2011 at 3:29 AM, Harald Wellmann <
hwellmann.de@googlemail.com> wrote:
> >
> > (3) From Maven using the openjpa-maven-plugin, as per <
> http://openjpa.apache.org/enhancement-with-maven.html>
> > - Possibly dead, or at least very quiet.
> > - Does not appear to work in Indigo even with <
> https://github.com/hwellmann/m2eclipse-extras/wiki>
> >
>
> I'm using this combo of openjpa-maven-plugin and my OpenJPA m2e
> extension with Eclipse 3.7.0 and 3.7.1 in a number of projects. What
> exactly does not work for you? Once I'm able to reproduce your
> problem, I can try and fix it...
>
> Best regards,
> Harald
>
--
*Rick Curtis*
Re: Best approach for performing OpenJPA enhancement in Eclipse Indigo
Posted by Harald Wellmann <hw...@googlemail.com>.
>
> (3) From Maven using the openjpa-maven-plugin, as per <http://openjpa.apache.org/enhancement-with-maven.html>
> - Possibly dead, or at least very quiet.
> - Does not appear to work in Indigo even with <https://github.com/hwellmann/m2eclipse-extras/wiki>
>
I'm using this combo of openjpa-maven-plugin and my OpenJPA m2e
extension with Eclipse 3.7.0 and 3.7.1 in a number of projects. What
exactly does not work for you? Once I'm able to reproduce your
problem, I can try and fix it...
Best regards,
Harald