gradleを使用しSpringBootを含んだ実行可能jarの作成方法を
以下のサンプルを元に教えて頂けないでしょうか?
(java -jarでSpringBootが起動するjarを作りたい)
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id 'org.jetbrains.kotlin.jvm' id 'io.spring.dependency-management' version '1.0.7.RELEASE' id 'net.corda.plugins.quasar-utils' id 'net.corda.plugins.cordformation' } ext { spring_boot_version = '1.5.7.RELEASE' spring_version = '4.3.11.RELEASE' } sourceSets { main { resources { srcDir "../config/dev" } } } // See https://docs.spring.io/dependency-management-plugin/docs/current/reference/html dependencyManagement { dependencies { dependency "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version" } } dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" testCompile "junit:junit:$junit_version" // Corda dependencies. compile "net.corda:corda-core:$corda_release_version" compile "net.corda:corda-jackson:$corda_release_version" compile "net.corda:corda-rpc:$corda_release_version" compile "net.corda:corda:$corda_release_version" testCompile "net.corda:corda-node-driver:$corda_release_version" compile("org.springframework.boot:spring-boot-starter-websocket:$spring_boot_version") { exclude group: "org.springframework.boot", module: "spring-boot-starter-logging" } compile "org.springframework.boot:spring-boot-starter-log4j2:$spring_boot_version" compile "org.apache.logging.log4j:log4j-web:$log4j_version" cordapp project(":contracts-java") cordapp project(":workflows-java") } tasks.withType(KotlinCompile) { kotlinOptions { languageVersion = "1.2" apiVersion = "1.2" jvmTarget = "1.8" javaParameters = true // Useful for reflection. } } task runPartyAServer(type: JavaExec, dependsOn: jar) { classpath = sourceSets.main.runtimeClasspath main = 'com.example.server.ServerKt' args '--server.port=50005', '--config.rpc.host=localhost', '--config.rpc.port=10005', '--config.rpc.username=user1', '--config.rpc.password=test' }