Important Notice
Thank you for opening an issue! Please note that, as outlined in the
README, I currently only
work on feature requests or bug fixes when sponsored. Balancing this project with professional and personal priorities
means I have a very limited amount of effort I can divert to this project.
You must put in the work to address this issue, or it won't be addressed.
Is your feature request related to a problem? Please describe.
Yes — the documented JPA setup no longer generates Q classes on modern JDKs, which makes the official documentation
actively misleading for new users.
The JPA tutorial at https://openfeign.github.io/querydsl/tutorials/jpa/querydsl instructs users to configure the
annotation processor via the maven-compiler-plugin's own <dependencies> block:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<generatedSourcesDirectory>target/generated-sources/java</generatedSourcesDirectory>
</configuration>
<dependencies>
<dependency>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>7.1</version>
<classifier>jpa</classifier>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>3.1.0</version>
</dependency>
</dependencies>
</plugin>
This approach relies on implicit annotation processing, where javac auto-discovers processors on the classpath.
Implicit annotation processing was deprecated in JDK 21 and fully removed in JDK 23. On JDK 23+ (I'm on JDK 25),
this configuration is silently ignored — no Q classes are produced.
Meanwhile, the referenced Examples instead put querydsl-apt as a project-level dependency:
<dependency>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>7.5</version>
</dependency>
<dependency>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>7.5</version>
<classifier>jpa</classifier>
</dependency>
But Maven does not recognize querydsl-apt as an annotation processor from a plain project dependency on JDK 23+.
Here is the confusing symptom: IntelliJ IDEA's "Build" generates Q classes correctly (IDEA runs its own
annotation-processing pipeline and picks up processors from the module classpath), but after mvn clean, neither mvn compile, mvn install, nor mvn package produces Q classes. This divergence between IDE builds and Maven builds
is very easy to mistake for a user error.
Describe the solution you'd like
Please update the JPA tutorial documentation to use the modern, explicit annotationProcessorPaths configuration,
which works reliably across JDK versions (including 23+):
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<proc>full</proc>
<generatedSourcesDirectory>${project.build.directory}/generated-sources/java</generatedSourcesDirectory>
<annotationProcessorPaths>
<path>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>7.5</version>
<classifier>jpa</classifier>
</path>
<path>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>3.1.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
Two details matter here, and both are worth documenting explicitly:
<proc>full</proc> — with implicit annotation processing removed on JDK 23+, this explicitly re-enables
processing.
jakarta.persistence-api must be listed inside annotationProcessorPaths — annotationProcessorPaths runs
the processor on an isolated classpath containing only the listed paths, so without JPA annotations the processor
cannot inspect @Entity and silently produces nothing.
Describe alternatives you've considered
- Keeping the current project-level
querydsl-apt dependency: works in the IDE but not in Maven on JDK 23+; also
leaks the processor to downstream consumers. Not a fix.
- Sticking with the documented plugin
<dependencies> block: only works on JDK 21 and earlier. Not a fix.
annotationProcessorPaths (chosen): the standard, recommended approach; explicit, isolated, and version-robust.
Additional context
- JDK: 25 (behavior starts at JDK 23; deprecated in 21).
- Maven:
mvn compile / install / package all fail to generate Q classes.
- I am happy to submit a PR to update the tutorial and any Examples docs that show the legacy configuration.
Important Notice
Thank you for opening an issue! Please note that, as outlined in the
README, I currently only
work on feature requests or bug fixes when sponsored. Balancing this project with professional and personal priorities
means I have a very limited amount of effort I can divert to this project.
You must put in the work to address this issue, or it won't be addressed.
Is your feature request related to a problem? Please describe.
Yes — the documented JPA setup no longer generates Q classes on modern JDKs, which makes the official documentation
actively misleading for new users.
The JPA tutorial at https://openfeign.github.io/querydsl/tutorials/jpa/querydsl instructs users to configure the
annotation processor via the
maven-compiler-plugin's own<dependencies>block:This approach relies on implicit annotation processing, where
javacauto-discovers processors on the classpath.Implicit annotation processing was deprecated in JDK 21 and fully removed in JDK 23. On JDK 23+ (I'm on JDK 25),
this configuration is silently ignored — no Q classes are produced.
Meanwhile, the referenced Examples instead put
querydsl-aptas a project-level dependency:But Maven does not recognize
querydsl-aptas an annotation processor from a plain project dependency on JDK 23+.Here is the confusing symptom: IntelliJ IDEA's "Build" generates Q classes correctly (IDEA runs its own
annotation-processing pipeline and picks up processors from the module classpath), but after
mvn clean, neithermvn compile,mvn install, normvn packageproduces Q classes. This divergence between IDE builds and Maven buildsis very easy to mistake for a user error.
Describe the solution you'd like
Please update the JPA tutorial documentation to use the modern, explicit
annotationProcessorPathsconfiguration,which works reliably across JDK versions (including 23+):
Two details matter here, and both are worth documenting explicitly:
<proc>full</proc>— with implicit annotation processing removed on JDK 23+, this explicitly re-enablesprocessing.
jakarta.persistence-apimust be listed insideannotationProcessorPaths—annotationProcessorPathsrunsthe processor on an isolated classpath containing only the listed paths, so without JPA annotations the processor
cannot inspect
@Entityand silently produces nothing.Describe alternatives you've considered
querydsl-aptdependency: works in the IDE but not in Maven on JDK 23+; alsoleaks the processor to downstream consumers. Not a fix.
<dependencies>block: only works on JDK 21 and earlier. Not a fix.annotationProcessorPaths(chosen): the standard, recommended approach; explicit, isolated, and version-robust.Additional context
mvn compile/install/packageall fail to generate Q classes.