인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

인프런 커뮤니티 질문&답변

태욱님의 프로필 이미지

작성한 질문수

실전! Querydsl

gradle build 에러 발생 제발 도와주세요 ㅠㅠ

작성

·

81

·

수정됨

0

=========================저의 build.gradle 설정 ===========================

plugins {
	id 'java'
	id 'org.springframework.boot' version '3.4.1'
	id 'io.spring.dependency-management' version '1.1.7'
}

group = 'study'
version = '0.0.1-SNAPSHOT'

java {
	toolchain {
		languageVersion = JavaLanguageVersion.of(23)
	}
}

configurations {
	compileOnly {
		extendsFrom annotationProcessor
	}
}

repositories {
	mavenCentral()
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	compileOnly 'org.projectlombok:lombok'
	runtimeOnly 'com.h2database:h2'
	annotationProcessor 'org.projectlombok:lombok'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
	testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
	//test 롬복 사용
	testCompileOnly 'org.projectlombok:lombok'
	testAnnotationProcessor 'org.projectlombok:lombok'


	//Querydsl 추가
	implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
	annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
	annotationProcessor "jakarta.annotation:jakarta.annotation-api"
	annotationProcessor "jakarta.persistence:jakarta.persistence-api"
}

tasks.named('test') {
	useJUnitPlatform()
}

clean {
	delete file('src/main/generated')
}

 

=============================Hello Entity==============================

package study.querydsl.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import lombok.Getter;
import lombok.Setter;

@Entity
@Getter
@Setter
public class Hello {

    @Id
    @GeneratedValue
    private Long id;
}
  1. Tasks -> build -> clean 정상적으로 작동합니다.

  2. Tasks -> build -> build 실행시 에러가 발생합니다.

==========================에러 코드===================================

오후 11:58:17: Executing 'build --scan'...

> Task :compileJava
> Task :processResources
> Task :classes
> Task :resolveMainClassName
> Task :bootJar
> Task :jar
> Task :assemble
> Task :compileTestJava
> Task :processTestResources NO-SOURCE
> Task :testClasses
> Task :test FAILED
7 actionable tasks: 7 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///C:/Users/USER/OneDrive/%EB%B0%94%ED%83%95%20%ED%99%94%EB%A9%B4/querydsl/querydsl/build/reports/tests/test/index.html

BUILD FAILED in 16s

Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Use defined at https://gradle.com/help/legal-terms-of-use. Do you accept these terms? [yes, no] 

The build scan was not published due to a configuration problem.

The Gradle Terms of Use have not been agreed to.

For more information, please see https://gradle.com/help/gradle-plugin-terms-of-use.

Alternatively, if you are using Develocity, specify the server location.
For more information, please see https://gradle.com/help/gradle-plugin-config.

오전 12:01:06: Execution finished 'build --scan'.

해당 작업 파일 구글 드라이브 입니다. Onedrive 모드가 문제일수 있다해서 연결은 해제했습니다.

https://drive.google.com/file/d/16tFQifUb64ZzBfhJkSc7RUHfLuFiJTjm/view?usp=drive_link

 

경로가 문제인가 싶어서 onedrive가 없는 C:\springtest 이렇게 파일 생성후 똑같이 해봤는데 clear 이상없고 build 실행하는데 에러코드는 안뜨지만 계속 Run 상태가 되어서 멈추니까 코드가 아래처럼 뜨네요..ㅠㅠ

오전 12:47:10: Executing 'build --scan'...

> Task :compileJava
> Task :processResources
> Task :classes
> Task :resolveMainClassName
> Task :bootJar
> Task :jar
> Task :assemble
> Task :compileTestJava
> Task :processTestResources NO-SOURCE
> Task :testClasses
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
2025-01-14T00:47:41.902+09:00  INFO 16840 --- [querydsl] [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2025-01-14T00:47:41.925+09:00  INFO 16840 --- [querydsl] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2025-01-14T00:47:41.929+09:00  INFO 16840 --- [querydsl] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
> Task :test
> Task :check
> Task :build

BUILD SUCCESSFUL in 31s
7 actionable tasks: 7 executed

Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Use defined at https://gradle.com/help/legal-terms-of-use. Do you accept these terms? [yes, no] 

The build scan was not published due to a configuration problem.

The Gradle Terms of Use have not been agreed to.

For more information, please see https://gradle.com/help/gradle-plugin-terms-of-use.

Alternatively, if you are using Develocity, specify the server location.
For more information, please see https://gradle.com/help/gradle-plugin-config.

오전 12:47:48: Execution finished 'build --scan'.

 

 

제발 도와주세요 ㅠㅠ 너무 힘듭니다...

답변 1

0

태욱님의 프로필 이미지
태욱
질문자

KakaoTalk_20250114_012706718.jpg.webp

겨우겨우 찾아보면서 하다보니 해결..? 한 것 같습니다. 도움 주실려고 들어와주신 모든분들 감사합니다.

몬이님의 프로필 이미지

안녕하세요. 같은 문제 발생해서 그런데 혹시 어떻게 해결하셨는지 알 수 있을까요?

태욱님의 프로필 이미지
태욱
질문자

파일을 c드라이브에 바로 만들고 거기다 스프링 압축받은거 압축 풀고 build 무한 로딩 나는건

BUILD SUCCESSFUL in 31s 7 actionable tasks: 7 executed 이 문구가 뜨면 정지 시켜보세요 그러니까 되네요

태욱님의 프로필 이미지

작성한 질문수

질문하기