Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement breaks in gradle multiproject setups #31

Closed
fraenkelc opened this issue Sep 28, 2020 · 7 comments
Closed

Enhancement breaks in gradle multiproject setups #31

fraenkelc opened this issue Sep 28, 2020 · 7 comments

Comments

@fraenkelc
Copy link

I've recently run into this issue which took some time to debug:
When running querybean enhancement on a gradle multiproject where the generated query beans are in a different project from the consumer the consumer project will not be properly enhanced.
The cause of this isssue is that gradle does not put the resources of the domain project on the consumer compile classpath. The ebean enhancer can then in turn not find the ebean.mf file and will not perform any querybean enhancement.
Here's a project that reproduces the issue (https://github.com/fraenkelc/annotationProcessor-reproducer) and a corresponding gradle build scan (https://scans.gradle.com/s/ywyzllxg5d67g/console-log#L12-L17)

I do have a workaround that uses the gradle variant system to require jars instead of folders on the classpath (see https://github.com/fraenkelc/annotationProcessor-reproducer/blob/master/workaround/build.gradle.kts#L6-L12).

Something that gave me a hard time and feels like bad UX is that it all works in a single project. It only breaks (and in a hard to debug way) once the domain model is extracted to a separate project.

Is there something that ebean can do to fix this? If not it would be great to add some documentation on how to deal with such issues.

@rbygrave
Copy link
Contributor

I think it might be good to also describe this to the ebean@googlegroups.com
https://groups.google.com/forum/#!forum/ebean

Getting a wider audience might be a good idea for this issue - get more input/thoughts.

Cheers, Rob.

@rbygrave
Copy link
Contributor

rbygrave commented Sep 28, 2020 via email

@rbygrave
Copy link
Contributor

rbygrave commented Sep 29, 2020 via email

@rbygrave
Copy link
Contributor

rbygrave commented Sep 29, 2020 via email

@rbygrave
Copy link
Contributor

rbygrave commented Sep 29, 2020 via email

@fraenkelc
Copy link
Author

thanks for taking a look at it. I can confirm that after upgrading the plugin no workaround is necessary anymore.
Sorry about the hassle. I'm not 100% sure where I picked up the old plugin version from but I think it was from the github releases link:
image

@rbygrave
Copy link
Contributor

rbygrave commented Sep 29, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants