Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349935 - [mojo] com.mysema.maven:maven-apt-plugin support
Summary: [mojo] com.mysema.maven:maven-apt-plugin support
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 351168 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-21 07:23 EDT by Michael Glauche CLA
Modified: 2021-04-19 13:23 EDT (History)
5 users (show)

See Also:


Attachments
small querydsl test project (3.44 KB, application/zip)
2011-06-21 09:22 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 Michael Glauche CLA 2011-06-21 07:23:30 EDT
Hi,
  we are using querydsl for creating JPA Entity Metadata, unfortunately the provided maven-apt-plugin does not work with m2eclipse 1.0.0 anymore. With version 0.12 it did work fine, there is a folder target/generated-sources/apt as an additional classpath entry in 0.12.

For a small example project see 
http://source.mysema.com/static/querydsl/2.1.1/reference/html/ch02s02.html#d0e306
Comment 1 Igor Fedorenko CLA 2011-06-21 08:11:55 EDT
Unless you plan to work on m2e integration yourself, please provide complete standalone sample project and detailed description of desired behaviour inside Eclipse workspace, i.e. what additional classpath entries are expected, what classes and/or resources should be generated and so on.
Comment 2 Michael Glauche CLA 2011-06-21 09:22:07 EDT
Created attachment 198335 [details]
small querydsl test project

Attached is a small QueryDSL JPA project. There is an entiy Book.java where the QBook meta-Class should be generated (in the same java package, but in the target/generated-sources/... folder). The output directory of the plugin (in the example it is generated-sources/apt, but it is configurable !) should be included in the eclipse classpath. Otherwise the "service" class can't compile.

To see if everything is working i did include a de.glauche.BookService Java class, which does utilize the generated meta-class.

The expected behaviour would be that eclipse does add the generated-sources path to the classpath folders. 

It would be nice if the sources would be re-generated if the matching entites change, but a manual generate-sources task is sufficient.
Comment 3 Igor Fedorenko CLA 2011-06-29 02:13:12 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 4 Igor Fedorenko CLA 2011-07-05 08:02:42 EDT
*** Bug 351168 has been marked as a duplicate of this bug. ***
Comment 5 Michael Glauche CLA 2011-08-06 13:16:15 EDT
I've startet to write a small configurator for this plugin. Right now the basic function is working, I'm still having a bit trouble getting incremental building to work (bit missing the whole picture here, is there more documentation for it somewhere ?)

After a bit cleanup i hope i can release it soon.
Comment 6 Ivica Loncar CLA 2011-08-17 03:57:30 EDT
Is this just a duplicate of bug 350923?
Comment 7 Timo Westkämper CLA 2011-08-17 04:01:20 EDT
(In reply to comment #6)
> Is this just a duplicate of bug 350923?

No, different groupId and different artifactId. Not the same plugin.
Comment 8 Ivica Loncar CLA 2011-09-01 15:08:54 EDT
I've written a configurer. It's available at https://github.com/ilx/m2e-querydsl

Please take a look, test, contribute. 

I'm not sure I've covered all annotation processors or configuration options.
Comment 9 Igor Fedorenko CLA 2013-09-28 23:39:26 EDT
closing as per last comment
Comment 10 Denis Roy CLA 2021-04-19 13:23:48 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/