티스토리 뷰

반응형

 

aws codebuild에서 아래처럼 build failed가 떨어졌다.

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :processResources
> Task :processTestResources NO-SOURCE

> Task :compileKotlin FAILED
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/common/dto/BaseIdResponse.kt:4:34 Unresolved reference: models
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/common/dto/BaseIdResponse.kt:7:21 Unresolved reference: IdResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/common/dto/BaseIdResponse.kt:12:27 Unresolved reference: IdResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/common/dto/BaseIdResponse.kt:13:20 Unresolved reference: IdResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:4:34 Unresolved reference: models
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:14:67 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:15:25 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:20:83 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:21:25 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:26:85 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:27:25 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:32:73 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:33:25 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:38:87 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/handler/RestExceptionHandler.kt:39:25 Unresolved reference: BaseExceptionResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/v1/autopayment/controller/AutoPaymentController.kt:12:34 Unresolved reference: controller
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/v1/autopayment/controller/AutoPaymentController.kt:13:34 Unresolved reference: models
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/v1/autopayment/controller/AutoPaymentController.kt:43:23 Unresolved reference: IdResponse
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/v1/autopayment/dto/GetAutoPaymentResponse.kt:6:34 Unresolved reference: models
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/v1/autopayment/dto/GetAutoPaymentResponse.kt:7:34 Unresolved reference: models
e: file:///codebuild/output/src1400401288/src/src/main/kotlin/kr/janeshop/payment/web/v1/autopayment/dto/GetAutoPaymentResponse.kt:8:34 Unresolved reference: models

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 5s
2 actionable tasks: 2 executed

가만, 저건 open api generate로 빌드한 파일들인데?

 

 

 

openApiGenerate를 통해 미리 빌드해야하는 파일들이 없어서 발생한 에러다.

 

 

 

build.gradle 파일에 아래 문장을

dependsOn("openApiGenerate")

이렇게 추가해주면 정상 작동한다.

tasks.withType<KotlinCompile> {
	kotlinOptions {
		freeCompilerArgs = listOf("-Xjsr305=strict")
		jvmTarget = "17"
	}
	dependsOn("openApiGenerate")
}

(참고 : https://openapi-generator.tech/docs/plugins/)

 

 

 

 

 

반응형

'Docker' 카테고리의 다른 글

[Docker] nGrinder 사용법  (0) 2022.01.06
[Docker] Nexus  (0) 2021.02.10
[Docker] Jenkins  (0) 2021.02.10
[Docker] Redmine  (0) 2021.02.10
[Docker] Gitlab  (0) 2021.02.10
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함