mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-05 17:38:06 +08:00
Skip providedRuntime configuration block with war projects
Closes gh-796
This commit is contained in:
parent
e34720a35a
commit
1fcf48e2fa
@ -49,12 +49,14 @@ repositories {
|
||||
{{/repositoryValues}}
|
||||
}
|
||||
|
||||
{{^war}}
|
||||
{{#providedDependencies}}
|
||||
configurations {
|
||||
providedRuntime
|
||||
}
|
||||
|
||||
{{/providedDependencies}}
|
||||
{{/war}}
|
||||
{{#hasBuildPropertiesVersions}}
|
||||
ext {
|
||||
{{#buildPropertiesVersions}}
|
||||
|
@ -219,7 +219,7 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
"implementation 'org.springframework.boot:spring-boot-starter-web'")
|
||||
.contains(
|
||||
"testImplementation 'org.springframework.boot:spring-boot-starter-test'")
|
||||
.contains("configurations {") // declare providedRuntime config
|
||||
.doesNotContain("configurations {") // no need to declare providedRuntime
|
||||
.contains("providedRuntime").contains(
|
||||
"providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'");
|
||||
}
|
||||
@ -235,7 +235,7 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
"implementation 'org.springframework.boot:spring-boot-starter-web'")
|
||||
.contains(
|
||||
"testImplementation 'org.springframework.boot:spring-boot-starter-test'")
|
||||
.contains("configurations {") // declare providedRuntime config
|
||||
.doesNotContain("configurations {") // no need to declare providedRuntime
|
||||
.contains("providedRuntime").contains(
|
||||
"providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'");
|
||||
}
|
||||
@ -497,7 +497,7 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
"implementation 'org.springframework.boot:spring-boot-starter-web'")
|
||||
.contains(
|
||||
"implementation 'org.springframework.boot:spring-boot-starter-data-jpa'")
|
||||
// declare providedRuntime config
|
||||
// declare providedRuntime config for jar-based projects
|
||||
.contains("runtimeOnly 'org.h2:h2'").contains("configurations {")
|
||||
.contains("providedRuntime")
|
||||
.contains("providedRuntime 'javax.servlet:servlet-api'")
|
||||
|
@ -23,10 +23,6 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
configurations {
|
||||
providedRuntime
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation 'org.codehaus.groovy:groovy'
|
||||
|
@ -23,10 +23,6 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
configurations {
|
||||
providedRuntime
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
|
||||
|
@ -27,10 +27,6 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
configurations {
|
||||
providedRuntime
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
|
Loading…
Reference in New Issue
Block a user