Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions parent-boot-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,25 @@
</plugins>
</build>
</profile>
<profile>
<id>thin-jar</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<!-- The following enables the "thin jar" deployment option. -->
<dependency>
<groupId>org.springframework.boot.experimental</groupId>
<artifactId>spring-boot-thin-layout</artifactId>
<version>${thin.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<properties>
Expand All @@ -115,6 +134,7 @@
<!-- plugins -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<thin.version>1.0.11.RELEASE</thin.version>
</properties>

</project>
22 changes: 22 additions & 0 deletions spring-boot-bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,28 @@
</plugins>
</build>
</profile>
<profile>
<id>thin-jar</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot.experimental</groupId>
<artifactId>spring-boot-thin-maven-plugin</artifactId>
<version>${thin.version}</version>
<executions>
<execution>
<!-- Download the dependencies at build time -->
<id>resolve</id>
<goals>
<goal>resolve</goal>
</goals>
<inherited>false</inherited>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<properties>
Expand Down
2 changes: 2 additions & 0 deletions spring-boot-gradle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.gradle/
build/
29 changes: 26 additions & 3 deletions spring-boot-gradle/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
buildscript {
ext {
springBootVersion = '2.0.0.RELEASE'
springBootPlugin = 'org.springframework.boot:spring-boot-gradle-plugin'
springBootVersion = '2.0.2.RELEASE'
thinPlugin = 'org.springframework.boot.experimental:spring-boot-thin-gradle-plugin'
thinVersion = '1.0.11.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("${springBootPlugin}:${springBootVersion}")
classpath("${thinPlugin}:${thinVersion}")
}
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
//add tasks thinJar and thinResolve for thin JAR deployments
apply plugin: 'org.springframework.boot.experimental.thin-launcher'

group = 'org.baeldung'
version = '0.0.1-SNAPSHOT'
Expand All @@ -23,7 +29,6 @@ repositories {
mavenCentral()
}


dependencies {
compile('org.springframework.boot:spring-boot-starter')
testCompile('org.springframework.boot:spring-boot-starter-test')
Expand All @@ -42,3 +47,21 @@ bootJar {
// attributes 'Start-Class': 'org.baeldung.DemoApplication'
// }
}

//Enable this to generate and use a pom.xml file
apply plugin: 'maven'

//If you want to customize the generated pom.xml you can edit this task and add it as a dependency to the bootJar task
task createPom {
def basePath = 'build/resources/main/META-INF/maven'
doLast {
pom {
withXml(dependencyManagement.pomConfigurer)
}.writeTo("${basePath}/${project.group}/${project.name}/pom.xml")
}
}
//Uncomment the following to use your custom generated pom.xml
bootJar.dependsOn = [createPom]

//Enable this to generate and use a thin.properties file
//bootJar.dependsOn = [thinProperties]
4 changes: 2 additions & 2 deletions spring-boot-gradle/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Feb 06 12:27:20 CET 2018
#Fri Jun 01 20:39:48 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip