[CI/CD] When using COPY with more than one source file, the destination must be a directory and end with a /

yesjm·2023년 3월 19일
0

Spring Boot 프로젝트를 AWS + Docker + Github Action을 사용해 배포하던 중 만난 에러

스프링 부트 gradle 플러그인 2.5 버전부터 gradle 빌드 시 JAR 파일이 2개 생성된다.

  • 프로젝트 이름-버전-.jar
  • 프로젝트 이름-버전-plain.jar

plain.jar에는 추가한 라이브러리 없이 작성한 코드만 들어있어 에러가 발생한다.

→ plain.jar 생성을 차단하면 문제를 해결할 수 있다!

build.gradle.kts에 아래 코드를 추가해준다

tasks.getByName<Jar>("jar"){
		enabled=false
}

참고
https://dev-j.tistory.com/22

profile
yesjm의 개발블로그~

0개의 댓글