Leave jar and war tasks enabled but configured with a classifier
Closes gh-23797pull/25690/head
parent
3f2a069e71
commit
ebdb046ca9
@ -0,0 +1,14 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'org.springframework.boot' version '{gradle-project-version}'
|
||||
}
|
||||
|
||||
// tag::disable-jar[]
|
||||
jar {
|
||||
enabled = false
|
||||
}
|
||||
// end::disable-jar[]
|
||||
|
||||
bootJar {
|
||||
mainClass = 'com.example.Application'
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import org.springframework.boot.gradle.tasks.bundling.BootJar
|
||||
|
||||
plugins {
|
||||
java
|
||||
id("org.springframework.boot") version "{gradle-project-version}"
|
||||
}
|
||||
|
||||
// tag::disable-jar[]
|
||||
tasks.getByName<Jar>("jar") {
|
||||
enabled = false
|
||||
}
|
||||
// end::disable-jar[]
|
||||
|
||||
tasks.getByName<BootJar>("bootJar") {
|
||||
mainClass.set("com.example.Application")
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
}
|
||||
|
||||
bootJar {
|
||||
mainClass = 'com.example.Application'
|
||||
classifier = 'boot'
|
||||
}
|
||||
|
||||
jar {
|
||||
enabled = true
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
plugins {
|
||||
id 'war'
|
||||
id 'org.springframework.boot' version '{version}'
|
||||
}
|
||||
|
||||
bootWar {
|
||||
mainClass = 'com.example.Application'
|
||||
classifier = 'boot'
|
||||
}
|
||||
|
||||
war {
|
||||
enabled = true
|
||||
}
|
Loading…
Reference in New Issue