mirror of
https://gitee.com/dcren/initializr.git
synced 2026-09-19 14:27:41 +08:00
Skip providedRuntime configuration block with war projects
Closes gh-796
This commit is contained in:
@@ -49,12 +49,14 @@ repositories {
|
|||||||
{{/repositoryValues}}
|
{{/repositoryValues}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{{^war}}
|
||||||
{{#providedDependencies}}
|
{{#providedDependencies}}
|
||||||
configurations {
|
configurations {
|
||||||
providedRuntime
|
providedRuntime
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/providedDependencies}}
|
{{/providedDependencies}}
|
||||||
|
{{/war}}
|
||||||
{{#hasBuildPropertiesVersions}}
|
{{#hasBuildPropertiesVersions}}
|
||||||
ext {
|
ext {
|
||||||
{{#buildPropertiesVersions}}
|
{{#buildPropertiesVersions}}
|
||||||
|
|||||||
+3
-3
@@ -219,7 +219,7 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
|||||||
"implementation 'org.springframework.boot:spring-boot-starter-web'")
|
"implementation 'org.springframework.boot:spring-boot-starter-web'")
|
||||||
.contains(
|
.contains(
|
||||||
"testImplementation 'org.springframework.boot:spring-boot-starter-test'")
|
"testImplementation 'org.springframework.boot:spring-boot-starter-test'")
|
||||||
.contains("configurations {") // declare providedRuntime config
|
.doesNotContain("configurations {") // no need to declare providedRuntime
|
||||||
.contains("providedRuntime").contains(
|
.contains("providedRuntime").contains(
|
||||||
"providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'");
|
"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'")
|
"implementation 'org.springframework.boot:spring-boot-starter-web'")
|
||||||
.contains(
|
.contains(
|
||||||
"testImplementation 'org.springframework.boot:spring-boot-starter-test'")
|
"testImplementation 'org.springframework.boot:spring-boot-starter-test'")
|
||||||
.contains("configurations {") // declare providedRuntime config
|
.doesNotContain("configurations {") // no need to declare providedRuntime
|
||||||
.contains("providedRuntime").contains(
|
.contains("providedRuntime").contains(
|
||||||
"providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'");
|
"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'")
|
"implementation 'org.springframework.boot:spring-boot-starter-web'")
|
||||||
.contains(
|
.contains(
|
||||||
"implementation 'org.springframework.boot:spring-boot-starter-data-jpa'")
|
"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("runtimeOnly 'org.h2:h2'").contains("configurations {")
|
||||||
.contains("providedRuntime")
|
.contains("providedRuntime")
|
||||||
.contains("providedRuntime 'javax.servlet:servlet-api'")
|
.contains("providedRuntime 'javax.servlet:servlet-api'")
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
|
||||||
providedRuntime
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
implementation 'org.codehaus.groovy:groovy'
|
implementation 'org.codehaus.groovy:groovy'
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
|
||||||
providedRuntime
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
|
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
|
||||||
|
|||||||
@@ -27,10 +27,6 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
|
||||||
providedRuntime
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||||
|
|||||||
Reference in New Issue
Block a user