-실행가능 jar with dependencies
jar {
enabled = true
manifest {
attributes 'Main-Class': "${thisProjectMainClass}"
}
// with dependencies
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
// 중복 파일 제외
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
bootJar {
enabled = false
}
https://lemontia.tistory.com/m/1056
-스프링부트 jar 설정
bootJar {
enabled = true
archiveFileName = '파일명.jar'
mainClassName = 'com.sample.batch.BatchApplication'
}
jar {
enabled = false
}
https://blog.leocat.kr/notes/2020/01/23/gradle-create-executable-jar-with-spring-boot
https://velog.io/@jwkim/spring-boot-build-jar
'gradle' 카테고리의 다른 글
gradle war task customizing (0) | 2020.09.22 |
---|---|
Could not run phased build action using Gradle distribution (0) | 2020.09.15 |
gradle 파일 관련 API (0) | 2020.07.31 |
using gradle plugin from local maven repository (0) | 2020.07.29 |
gradle 원격 배포 (0) | 2020.07.28 |