|
3 | 3 |
|
4 | 4 |
|
5 | 5 |
|
6 |
| -[[publishing-your-application-maven]] |
7 |
| -=== Publishing with the Maven Plugin |
8 |
| -When the {maven-plugin}[`maven` plugin] is applied, an `Upload` task for the `bootArchives` configuration named `uploadBootArchives` is automatically created. |
9 |
| -By default, the `bootArchives` configuration contains the archive produced by the `bootJar` or `bootWar` task. |
10 |
| -The `uploadBootArchives` task can be configured to publish the archive to a Maven repository: |
| 6 | +[[publishing-your-application-maven-publish]] |
| 7 | +=== Publishing with the Maven-publish Plugin |
| 8 | +To publish your Spring Boot jar or war, add it to the publication using the `artifact` method on `MavenPublication`. |
| 9 | +Pass the task that produces that artifact that you wish to publish to the `artifact` method. |
| 10 | +For example, to publish the artifact produced by the default `bootJar` task: |
11 | 11 |
|
12 | 12 | [source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
|
13 | 13 | .Groovy
|
14 | 14 | ----
|
15 |
| -include::../gradle/publishing/maven.gradle[tags=upload] |
| 15 | +include::../gradle/publishing/maven-publish.gradle[tags=publishing] |
16 | 16 | ----
|
17 | 17 |
|
18 | 18 | [source,kotlin,indent=0,subs="verbatim,attributes",role="secondary"]
|
19 | 19 | .Kotlin
|
20 | 20 | ----
|
21 |
| -include::../gradle/publishing/maven.gradle.kts[tags=upload] |
| 21 | +include::../gradle/publishing/maven-publish.gradle.kts[tags=publishing] |
22 | 22 | ----
|
23 | 23 |
|
24 | 24 |
|
25 | 25 |
|
26 |
| -[[publishing-your-application-maven-publish]] |
27 |
| -=== Publishing with the Maven-publish Plugin |
28 |
| -To publish your Spring Boot jar or war, add it to the publication using the `artifact` method on `MavenPublication`. |
29 |
| -Pass the task that produces that artifact that you wish to publish to the `artifact` method. |
30 |
| -For example, to publish the artifact produced by the default `bootJar` task: |
| 26 | +[[publishing-your-application-maven]] |
| 27 | +=== Publishing with the Maven Plugin |
| 28 | +When the {maven-plugin}[`maven` plugin] is applied, an `Upload` task for the `bootArchives` configuration named `uploadBootArchives` is automatically created. |
| 29 | +By default, the `bootArchives` configuration contains the archive produced by the `bootJar` or `bootWar` task. |
| 30 | +The `uploadBootArchives` task can be configured to publish the archive to a Maven repository: |
31 | 31 |
|
32 | 32 | [source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
|
33 | 33 | .Groovy
|
34 | 34 | ----
|
35 |
| -include::../gradle/publishing/maven-publish.gradle[tags=publishing] |
| 35 | +include::../gradle/publishing/maven.gradle[tags=upload] |
36 | 36 | ----
|
37 | 37 |
|
38 | 38 | [source,kotlin,indent=0,subs="verbatim,attributes",role="secondary"]
|
39 | 39 | .Kotlin
|
40 | 40 | ----
|
41 |
| -include::../gradle/publishing/maven-publish.gradle.kts[tags=publishing] |
| 41 | +include::../gradle/publishing/maven.gradle.kts[tags=upload] |
42 | 42 | ----
|
43 | 43 |
|
44 |
| - |
| 44 | +WARNING: The maven plugin has been deprecated in Gradle 6.0 and is scheduled to be removed in Gradle 7.0. Please use the maven-publish plugin instead. |
45 | 45 |
|
46 | 46 | [[publishing-your-application-distribution]]
|
47 | 47 | === Distributing with the Application Plugin
|
|
0 commit comments