Avoid overriding baseName for jar/war task

Closes gh-381
This commit is contained in:
Stephane Nicoll 2017-03-15 14:19:11 +01:00
parent 9e35b8acd6
commit c6194d2357
13 changed files with 14 additions and 59 deletions

View File

@ -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 {

View File

@ -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(

View File

@ -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());
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {