build관련 질문드립니다.
3397
작성한 질문수 4
안녕하세요 영한님.
스프링 입문 로드맵부터 지금까지 정말 좋은 강의 감사합니다.
로컬에서는 compileQuerydsl도 정상적으로 작동되고 Q클래스도 잘 생성 되는데
결국에 배포를 하기 위해서는 build를 해야 하는데 해당 부분에서 계속 문제가 생겨서 질문드립니다.
아래는 설정파일입니다.
querydsl관련 중복 에러만 발생하여 다른 라이브러리는 제외하고 해당 부분만 올렸습니다.
buildscript {
ext {
queryDslVersion = "5.0.0"
}
}
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.3'
id 'io.spring.dependency-management' version '1.1.0'
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
}
group = 'heyuniverse'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
}
tasks.named('test') {
useJUnitPlatform()
}
def querydslDir = "$buildDir/generated/querydsl"
clean {
delete file(querydslDir)
}
querydsl {
jpa = true
querydslSourcesDir = querydslDir
}
sourceSets {
main.java.srcDir querydslDir
}
configurations {
querydsl.extendsFrom compileClasspath
}
compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
아래는 배포를 위해 build시 발생하는 에러 로그입니다.
> Task :compileJava FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
3 actionable tasks: 3 executed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
Attempt to recreate a file for type xxxx.xxxx.QClass
Attempt to recreate a file for type xxxx.xxxx.QClass
Attempt to recreate a file for type xxxx.xxxx.QClass
Attempt to recreate a file for type xxxx.xxxx.QClass



인텔리제이 ,gradle 양쪽 다 캐쉬 삭제 후 실행 해봐도 결과는 같았고,
gradle 버전이 문제인가 하여 8.0으로 업그레이드 해봐도 해결이 되지는 않았습니다.
이틀 넘게 종일 매달려봐도 도무지 질문할 곳이 없어서 남겨봅니다 ,,
답변 1
1
안녕하세요, 박민규 님. 공식 서포터즈 y2gcoder 입니다.
QueryDSL의 설정법은 워낙 다양해서 더 어렵다고 생각합니다. 해당 링크(클릭)를 참고하셔서 밑의 tasks.named('test') {} 이하 항목을 다 날려보시고 QClass를 생성하는 방법으로 해보시는 것을 추천드립니다.
저는 위의 링크에 있는 설정 + Intellij Build Tool에서 Gradle로 설정해서 다른 것 만져주는 것 없이 사용하고 있습니다.
감사합니다.
1
build and run using과 run test using을 gradle로 사용하시는건가요??
저두 그렇게하는데 그렇게하면 QuerydslApplication이 동작하지 않고 Process 'command '/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
이 에러가 발생하는데 어떻게 해결해야하나요??
SpringBoot 4.X에서의 Querydsl 설정
0
104
2
querydsl 오픈소스에 대한 질문
1
81
1
예제에서의 카운트 쿼리에서 join문과 where문은 필요없지 않나요?
0
112
1
Querydsl 6.X버전에 대해서 어떻게 생각하시나요?
0
324
2
여러 테이블 조인하여 통계치를 구하고자 할 때 어떤 방법이 더 효율적일까요
1
73
1
fetchResults()는 더이상 권장되지 않는다는데 맞나요?
0
164
1
querydsl sum() 메서드 없어요.
0
163
2
build 디렉터리 생성
0
142
2
자바 ORM 표준 JPA 프로그래밍 - 기본편 듣고 바로 학습해도 괜찮을까요?
0
115
2
현재 Querydsl에서 from절 서브쿼리를 지원하나요?
0
94
1
오타 제보 드립니다.
0
74
2
벌크 연산과 flush, clear
0
77
1
Run As Intellij 로 변경시 Q타입 import 불가
0
90
1
QHello import하기 문제 발생
0
149
2
등록된 함수 보는법(H2Dialect) 질문
0
70
2
5.0부터 Querydsl은 향후 fetchCount() , fetchResult() 를 지원하지 않기로 결정했다고 하는데 이에 맞는 강의
1
201
2
[환경설정 PDF 부트 3.0이후 설명 질문] build.gradle에 compileQuerydsl을 정의하지 않은 상태에서 Gradle->Tasks->other->compileQuerydsl을 클릭하라고 하는 이유가 무엇인가요??
1
203
1
querydsl 설정 문제
0
223
2
quey dsl 설정부분
0
159
2
count 쿼리 관련 질문입니다!
0
75
1
stringtemplate를 이용하여 where절 검색 방법 질문 드립니다.
0
90
1
답변부탁드리겠습니다.
0
91
2
(OrderSpecifier)관련 내용 어디있을가요
0
67
1
중급문법 벌크연산에서
0
84
2





