Do you see your QClasses generated in Gradle output? From your mistake, it seems that she has already passed the point where she should generate them.
I think the problem is that you are not setting up a JPAAnnotationProcessor . This is done as a convenience in Gradle by adding: jpa to your querydsl-apt dependency. In Maven, you apply the plugin manually .
I have the following in my build.gradle related to querydsl.
idea { module { sourceDirs += file('generated/') generatedSourceDirs += file('generated/') } } [...] compile "com.querydsl:querydsl-root:$querydslVersion" compile "com.querydsl:querydsl-jpa:$querydslVersion" compile "com.querydsl:querydsl-apt:$querydslVersion:jpa
The idea block just auto-configures the generated source directory in IDEA, so the assemblies inside the IDE work correctly.
EDIT:
The output of JPAAnnotationProcessor as follows.
Note: Running JPAAnnotationProcessor Note: Serializing Supertypes Note: Generating com.myclass.example.QMappedSuperClass for [com.myclass.example.MappedSuperClass] Note: Serializing Entity types Note: Generating com.myclass.example.QMyClass for [com.myclass.example.MyClass]
EDIT:
I was not familiar with the ewerk plugin, so I looked. It looks like it is trying to activate the JPAAnnotationProcessor for you. You may need to set the JPA flag for documentation here , since the default is false.
See comment for dependency issues.
source share