mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-30 12:48:01 +08:00
Avoid overriding baseName for jar/war task
Closes gh-381
This commit is contained in:
parent
9e35b8acd6
commit
c6194d2357
@ -41,11 +41,7 @@ apply plugin: 'io.spring.dependency-management'
|
||||
apply plugin: 'war'
|
||||
{{/war}}
|
||||
|
||||
{{#war}}war{{/war}}{{^war}}jar{{/war}} {
|
||||
baseName = '{{artifactId}}'
|
||||
version = '{{version}}'
|
||||
}
|
||||
|
||||
version = '{{version}}'
|
||||
sourceCompatibility = {{javaVersion}}
|
||||
|
||||
repositories {
|
||||
|
@ -168,8 +168,8 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
|
||||
request.setType("gradle-project");
|
||||
generateProject(request).isJavaWarProject().isGradleProject().gradleBuildAssert()
|
||||
// This is tagged as web facet so it brings the web one
|
||||
.contains("compile('org.foo:thymeleaf')").contains("war {")
|
||||
.contains("compile('org.foo:thymeleaf')").contains("apply plugin: 'war'")
|
||||
.contains("apply plugin: 'war'")
|
||||
.contains("compile('org.foo:thymeleaf')")
|
||||
.doesNotContain(
|
||||
"compile('org.springframework.boot:spring-boot-starter-web')")
|
||||
.contains(
|
||||
|
@ -38,8 +38,7 @@ public class GradleBuildAssert {
|
||||
* Validate that this generated gradle build validates against its request.
|
||||
*/
|
||||
public GradleBuildAssert validateProjectRequest(ProjectRequest request) {
|
||||
return hasArtifactId(request.getArtifactId()).hasVersion(request.getVersion())
|
||||
.hasBootVersion(request.getBootVersion())
|
||||
return hasVersion(request.getVersion()).hasBootVersion(request.getBootVersion())
|
||||
.hasJavaVersion(request.getJavaVersion());
|
||||
}
|
||||
|
||||
|
@ -16,11 +16,7 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
jar {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
@ -16,11 +16,7 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
jar {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
@ -16,11 +16,7 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
jar {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
@ -16,11 +16,7 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
jar {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
@ -16,11 +16,7 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
jar {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
@ -17,11 +17,7 @@ apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
apply plugin: 'war'
|
||||
|
||||
war {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
@ -16,11 +16,7 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
jar {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
@ -17,11 +17,7 @@ apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
apply plugin: 'war'
|
||||
|
||||
war {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
@ -20,11 +20,7 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
jar {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
@ -21,11 +21,7 @@ apply plugin: 'spring-boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
apply plugin: 'war'
|
||||
|
||||
war {
|
||||
baseName = 'demo'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
}
|
||||
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
|
Loading…
Reference in New Issue
Block a user