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
QClass not generated querydslDir in Gradle Setting #3615
Comments
@Voyager003 try to remove |
@rpkyrych I fixed to remove plugin as you said, but build is failed and occured this error,
So I'm using the following settings this stopgap. def generated = 'src/main/generated'
// add script
clean {
delete file (generated)
}
querydsl {
jpa = true
querydslSourcesDir = generated
}
sourceSets {
main.java.srcDir generated
}
// add script
tasks.compileQuerydsl.dependsOn(clean);
compileQuerydsl{
options.annotationProcessorPath = configurations.querydsl
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
querydsl.extendsFrom compileClasspath
} Add a QType removal action to the Querydsl-related plugin removal and clean actions to create a new QType on gradle task - build. |
Hey, @Voyager003 here is my working configuration without the plugin with Spring, Lombok and Mapstruct.
and nothing more in it related to querydsl. |
Observed vs. expected behavior
After installing the querydsl dependency,
running build-> compileQuerydsl generate a QClass under build/generated/queydsl with the path to def querydsl.
However when run the application, the path of QClass is changed to build/generated/querydsl/generated and
'the error java: Attempt to recreate a file for type ...' occurs.
it's directory befroe running application.
it's directory after running application and occur 'java: Attempt to recreate a file for type' error
Steps to reproduce
Environment
Querydsl version: 5.0.0
Querydsl module: querydsl-jpa, querydsl-apt
Database: H2 DB
JDK: Java 17
Spring Boot: 3.1.0
Additional details
After the path is changed, move the toy to generated and run the application again and it should work.
The text was updated successfully, but these errors were encountered: