Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Q classes not being generated. #54

Open
MarinKacaj opened this issue Jan 21, 2017 · 5 comments
Open

Q classes not being generated. #54

MarinKacaj opened this issue Jan 21, 2017 · 5 comments

Comments

@MarinKacaj
Copy link

MarinKacaj commented Jan 21, 2017

I'm developing an app with the Apache Isis framework, where I use Query DSL for typesafe JDO queries.
My configuration is similar to the one described here.
I'm also using com.mysema.query.apt.jdo.JDOAnnotationProcessor for domains annotated with javax.jdo.annotations.PersistenceCapable.
Domains are located in directory paths such as dom.domainapp.student.Student, dom.domainapp.subject.Subject, etc.

In configuration options querydsl.suffix and querydsl.prefix are both set to the letter D to avoid conflicts with the Q already used by Apache Isis.

However domain classes are not being generated by Query DSL.

I have also tried running mvn apt:process manually from the command line to no avail.

Maven version: 3.3.3
OS: Windows 10
apt-maven-plugin version: 1.1.3
Apache Isis version: 1.13.1
Query DSL version: 3.7.4

@Shredder121
Copy link
Member

Could you make an example project, that we can inspect and debug?

@MarinKacaj
Copy link
Author

This is where I'm experimenting with Query DSL in my sample project.
Query DSL is used by the dom module, as configured here.
Thanks.

@Shredder121
Copy link
Member

To me it looks like it's working.
Although I noticed that nothing happens if JAVA_HOME points to just a JRE instead of a JDK.
Could you confirm this?

Also, since the root project doesn't have the apt-maven-plugin bound, calling it from there results in it picking a different one, which indeed notifies me of just a JRE running.

@MarinKacaj
Copy link
Author

MarinKacaj commented Jan 23, 2017

I checked JAVA_HOME and it was set to the 1.8.060 JDK.
Following your finding, I went for apt-maven-plugin. BuildPlan Maven Plugin got me the mapping of goals to lifecycle phases as described here, in Chad Nouis' answer.
This is what I got from BuildPlan: apt-maven-plugin | generate-sources | default | process
So I added mvn generate-sources as a step before any other step that pertains to Apache Isis. It generated the Q classes (D in my case) just as expected.
If necessary I'll look further into the matter. Please let me know.
Thank you.

@pranav0073
Copy link

@MarinKacaj thanks
this works form me -- mvn generate-source

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

No branches or pull requests

3 participants