JPA apt processor should depend on javax.persistence-api to work in gradle
envgap__querydsl__querydsl-2488
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
aee2f56adb244709acf4cd89b61aa04d004c4ca1- Manifest
querydsl-apt/pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
querydsl/querydsl #2488 · read the original issue
While using gradle 5+ you're not able to use jpa apt processor because it's depending on `javax.persistence-api` but that is probably not available. **Reason:** Gradle introduced `annotationProcessor` scope and the result of that is that most of the projects won't have persistence annotations in this scope. **Workaround:** Explictly declare `javax.persistence-api` dependency (or jakarta now probably): ``` annotationProcessor jakarta.persistence:jakarta.persistence-api' annotationProcessor 'com.querydsl:querydsl-apt:$queryDslVersion:jpa' ``` **Solution:** Change maven scope from provided? **Related:** https://github.com/querydsl/querydsl/issues/2242 **Reference:** https://stackoverflow.com/a/55554542 https://github.com/querydsl/querydsl/blob/master/querydsl-apt/pom.xml#L49 https://discuss.gradle.org/t/annotationprocessor-querydsl-java-lang-noclassdeffounderror/27107
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]