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