You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-47
Original file line number
Diff line number
Diff line change
@@ -32,12 +32,43 @@ means adding it to the Spring Boot plugin declaration:
32
32
</plugin>
33
33
```
34
34
35
-
and in Gradle, you can use the older `apply` style declaration:
35
+
and in Gradle, you need to add the `thin-launcher` plugin and (preferably) a `maven-publish` plugin with an explicit publication definition. You can use the newer `id` style declaration:
36
+
37
+
```groovy
38
+
plugins {
39
+
id 'org.springframework.boot' version '3.0.1'
40
+
id 'io.spring.dependency-management' version '1.1.0'
41
+
id 'java'
42
+
id 'maven-publish'
43
+
id 'org.springframework.boot.experimental.thin-launcher' version '1.0.29.RELEASE'
44
+
}
45
+
46
+
group = 'com.example'
47
+
version = '0.0.1-SNAPSHOT'
48
+
sourceCompatibility = '17'
49
+
50
+
repositories {
51
+
mavenLocal()
52
+
mavenCentral()
53
+
maven { url "https://repo.spring.io/snapshot" }
54
+
maven { url "https://repo.spring.io/milestone" }
55
+
}
56
+
57
+
publishing {
58
+
publications {
59
+
maven(MavenPublication) {
60
+
from components.java
61
+
}
62
+
}
63
+
}
64
+
```
65
+
66
+
or you can use the older `apply` style declaration:
36
67
37
68
```groovy
38
69
buildscript {
39
70
ext {
40
-
springBootVersion = '2.2.4.RELEASE'
71
+
springBootVersion = '2.7.6'
41
72
wrapperVersion = '1.0.29.RELEASE'
42
73
}
43
74
repositories {
@@ -61,36 +92,7 @@ publishing {
61
92
}
62
93
```
63
94
64
-
Or you can use the newer `id` style declaration:
65
-
66
-
```groovy
67
-
plugins {
68
-
id 'org.springframework.boot' version '2.2.4.RELEASE'
69
-
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
70
-
id 'java'
71
-
id 'maven-publish'
72
-
id 'org.springframework.boot.experimental.thin-launcher' version '1.0.29.RELEASE'
73
-
}
74
-
75
-
group = 'com.example'
76
-
version = '0.0.1-SNAPSHOT'
77
-
sourceCompatibility = '1.8'
78
-
79
-
repositories {
80
-
mavenLocal()
81
-
mavenCentral()
82
-
maven { url "https://repo.spring.io/snapshot" }
83
-
maven { url "https://repo.spring.io/milestone" }
84
-
}
85
-
86
-
publishing {
87
-
publications {
88
-
maven(MavenPublication) {
89
-
from components.java
90
-
}
91
-
}
92
-
}
93
-
```
95
+
The publication named "maven" is responsible for creating a `pom.xml` for your application.
94
96
95
97
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):
96
98
@@ -259,21 +261,7 @@ configuration flag in the plugin (or `-Dthin.compute=false` on the command line)
259
261
260
262
### Gradle
261
263
262
-
The same features are available to Gradle users by adding a plugin:
0 commit comments