Skip to content

Commit c273482

Browse files
Mikael Newquistdsyer
authored andcommitted
Update README.md to remove references to Spring 1.5.x and use
"maven-publish" plugin instead of "maven". Updated samples to use "maven-publish" plugin instead of "maven".
1 parent e19c8d0 commit c273482

File tree

8 files changed

+94
-22
lines changed

8 files changed

+94
-22
lines changed

README.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Spring Boot Thin Launcher [![ci.spring.io](https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-boot-thin-launcher/badge)](https://ci.spring.io/teams/spring-team/pipelines/spring-boot-thin-launcher)
22

3-
A "thin" jar launcher for java apps. Version 1.0.25.RELEASE is in Maven Central, snapshots are in https://repo.spring.io/libs-snapshot. See https://github.com/spring-projects/spring-boot/issues/1813 for more discussion and ideas.
3+
A "thin" jar launcher for java apps. Version 1.0.27.RELEASE is in Maven Central, snapshots are in https://repo.spring.io/libs-snapshot. See https://github.com/spring-projects/spring-boot/issues/1813 for more discussion and ideas.
44

55
## Getting Started
66

@@ -26,19 +26,19 @@ means adding it to the Spring Boot plugin declaration:
2626
<dependency>
2727
<groupId>org.springframework.boot.experimental</groupId>
2828
<artifactId>spring-boot-thin-layout</artifactId>
29-
<version>1.0.25.RELEASE</version>
29+
<version>1.0.27.RELEASE</version>
3030
</dependency>
3131
</dependencies>
3232
</plugin>
3333
```
3434

35-
and in Gradle for Spring Boot up to 1.5.x (you can use older versions of Spring Boot for the app, but the plugin has to be 1.5.x or later):
35+
and in Gradle, you can use the older `apply` style declaration:
3636

3737
```groovy
3838
buildscript {
3939
ext {
40-
springBootVersion = '1.5.6.RELEASE'
41-
wrapperVersion = '1.0.25.RELEASE'
40+
springBootVersion = '2.2.4.RELEASE'
41+
wrapperVersion = '1.0.27.RELEASE'
4242
}
4343
repositories {
4444
mavenLocal()
@@ -49,19 +49,27 @@ buildscript {
4949
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
5050
}
5151
}
52-
apply plugin: 'maven'
52+
apply plugin: 'maven-publish'
5353
apply plugin: 'org.springframework.boot.experimental.thin-launcher'
54+
55+
publishing {
56+
publications {
57+
maven(MavenPublication) {
58+
from components.java
59+
}
60+
}
61+
}
5462
```
5563

56-
For Spring Boot 2.x you can use the newer `id` style declaration:
64+
Or you can use the newer `id` style declaration:
5765

5866
```groovy
5967
plugins {
6068
id 'org.springframework.boot' version '2.2.4.RELEASE'
6169
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
6270
id 'java'
63-
id 'maven'
64-
id 'org.springframework.boot.experimental.thin-launcher' version '1.0.25.RELEASE'
71+
id 'maven-publish'
72+
id 'org.springframework.boot.experimental.thin-launcher' version '1.0.27.RELEASE'
6573
}
6674
6775
group = 'com.example'
@@ -74,6 +82,14 @@ repositories {
7482
maven { url "https://repo.spring.io/snapshot" }
7583
maven { url "https://repo.spring.io/milestone" }
7684
}
85+
86+
publishing {
87+
publications {
88+
maven(MavenPublication) {
89+
from components.java
90+
}
91+
}
92+
}
7793
```
7894

7995
For Spring Boot 2.x snapshot versions (or older releases) you also need a `settings.gradle` with the repository configuration for the plugin. e.g. (as generated by https://start.spring.io):
@@ -150,7 +166,7 @@ with that class loader. The `pom.xml` can be in the root of the jar or
150166
in the standard `META-INF/maven` location.
151167

152168
The app jar in the demo is built using the Spring Boot plugin and a
153-
custom `Layout` (so it only builds with Spring Boot 1.5.x and above).
169+
custom `Layout` (so it only builds with Spring Boot 2.x and above).
154170

155171
## Caching JARs
156172

@@ -405,7 +421,7 @@ versions, you can change the version of the bom using
405421
`thin.properties`. E.g.
406422

407423
```
408-
boms.spring-boot-dependencies=org.springframework.boot:spring-boot-dependencies:1.5.6.RELEASE
424+
boms.spring-boot-dependencies=org.springframework.boot:spring-boot-dependencies:2.2.4.RELEASE
409425
...
410426
```
411427

@@ -414,8 +430,8 @@ Spring Boot starter parent), you can change the value of the property
414430
using `thin.properties`. E.g.
415431

416432
```
417-
spring-boot.version=1.5.6.RELEASE
418-
spring-cloud.version=Dalston.SR3
433+
spring-boot.version=2.2.4.RELEASE
434+
spring-cloud.version=Hoxton.SR1
419435
```
420436

421437
where the pom has

locator/build.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ buildscript {
1616
}
1717

1818
apply plugin: 'java'
19-
apply plugin: 'maven'
19+
apply plugin: 'maven-publish'
2020
apply plugin: 'eclipse'
2121
apply plugin: 'org.springframework.boot'
2222

@@ -45,4 +45,12 @@ dependencies {
4545
testCompile('org.springframework.boot:spring-boot-starter-test')
4646
}
4747

48-
jar.dependsOn = [createPom]
48+
jar.dependsOn = [createPom]
49+
50+
publishing {
51+
publications {
52+
maven(MavenPublication) {
53+
from components.java
54+
}
55+
}
56+
}

samples/fat/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'org.springframework.boot' version '2.2.4.RELEASE'
33
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
44
id 'java'
5-
id 'maven'
5+
id 'maven-publish'
66
}
77

88
group = 'com.example'
@@ -26,3 +26,11 @@ dependencies {
2626
test {
2727
useJUnitPlatform()
2828
}
29+
30+
publishing {
31+
publications {
32+
maven(MavenPublication) {
33+
from components.java
34+
}
35+
}
36+
}

samples/multi/application/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'org.springframework.boot' version '2.3.9.RELEASE'
33
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
44
id 'java'
5-
id 'maven'
5+
id 'maven-publish'
66
id 'org.springframework.boot.experimental.thin-launcher' version '1.0.27.BUILD-SNAPSHOT'
77
}
88

@@ -23,3 +23,11 @@ dependencies {
2323
testCompile('org.springframework.boot:spring-boot-starter-test')
2424
}
2525

26+
publishing {
27+
publications {
28+
maven(MavenPublication) {
29+
from components.java
30+
}
31+
}
32+
}
33+

samples/multi/library/build.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java'
3-
id 'maven'
3+
id 'maven-publish'
44
}
55

66
plugins { id "io.spring.dependency-management" version "1.0.4.RELEASE" }
@@ -9,7 +9,7 @@ ext { springBootVersion = '1.5.10.RELEASE' }
99

1010
apply plugin: 'java'
1111
apply plugin: 'eclipse'
12-
apply plugin: 'maven'
12+
apply plugin: 'maven-publish'
1313

1414
group = 'com.example'
1515
version = '0.0.1-SNAPSHOT'
@@ -29,3 +29,11 @@ dependencies {
2929
dependencyManagement {
3030
imports { mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}") }
3131
}
32+
33+
publishing {
34+
publications {
35+
maven(MavenPublication) {
36+
from components.java
37+
}
38+
}
39+
}

samples/other/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'org.springframework.boot' version '2.3.7.RELEASE'
33
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
44
id 'java'
5-
id 'maven'
5+
id 'maven-publish'
66
id 'org.springframework.boot.experimental.thin-launcher' version '1.0.27.BUILD-SNAPSHOT'
77
}
88

@@ -26,3 +26,11 @@ dependencies {
2626
compile('org.springframework.boot:spring-boot-starter')
2727
testCompile('org.springframework.boot:spring-boot-starter-test')
2828
}
29+
30+
publishing {
31+
publications {
32+
maven(MavenPublication) {
33+
from components.java
34+
}
35+
}
36+
}

samples/shadow/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ buildscript {
1919
}
2020

2121
apply plugin: 'java'
22-
apply plugin: 'maven'
22+
apply plugin: 'maven-publish'
2323
apply plugin: 'eclipse'
2424
apply plugin: 'io.spring.dependency-management'
2525
apply plugin: 'com.github.johnrengelman.shadow'
@@ -72,3 +72,11 @@ dependencies {
7272
compile('org.springframework.boot:spring-boot-starter')
7373
testCompile('org.springframework.boot:spring-boot-starter-test')
7474
}
75+
76+
publishing {
77+
publications {
78+
maven(MavenPublication) {
79+
from components.java
80+
}
81+
}
82+
}

samples/simple/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'org.springframework.boot' version '2.2.4.RELEASE'
33
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
44
id 'java'
5-
id 'maven'
5+
id 'maven-publish'
66
id 'org.springframework.boot.experimental.thin-launcher' version '1.0.27.BUILD-SNAPSHOT'
77
}
88

@@ -41,3 +41,11 @@ dependencyManagement {
4141
test {
4242
useJUnitPlatform()
4343
}
44+
45+
publishing {
46+
publications {
47+
maven(MavenPublication) {
48+
from components.java
49+
}
50+
}
51+
}

0 commit comments

Comments
 (0)