Skip to content

Commit b86351d

Browse files
committed
Merge branch '2.3.x' into 2.4.x
Closes gh-25307
2 parents 176949f + 08802d3 commit b86351d

File tree

1 file changed

+17
-14
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc

1 file changed

+17
-14
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/publishing.adoc

+17-14
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,45 @@
33

44

55

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:
1111

1212
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
1313
.Groovy
1414
----
15-
include::../gradle/publishing/maven.gradle[tags=upload]
15+
include::../gradle/publishing/maven-publish.gradle[tags=publishing]
1616
----
1717

1818
[source,kotlin,indent=0,subs="verbatim,attributes",role="secondary"]
1919
.Kotlin
2020
----
21-
include::../gradle/publishing/maven.gradle.kts[tags=upload]
21+
include::../gradle/publishing/maven-publish.gradle.kts[tags=publishing]
2222
----
2323

2424

2525

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+
WARNING: The `maven` plugin has been deprecated in Gradle 6 and has been removed in Gradle 7.
29+
Please use the `maven-publish` plugin instead.
30+
31+
When the {maven-plugin}[`maven` plugin] is applied, an `Upload` task for the `bootArchives` configuration named `uploadBootArchives` is automatically created.
32+
By default, the `bootArchives` configuration contains the archive produced by the `bootJar` or `bootWar` task.
33+
The `uploadBootArchives` task can be configured to publish the archive to a Maven repository:
3134

3235
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
3336
.Groovy
3437
----
35-
include::../gradle/publishing/maven-publish.gradle[tags=publishing]
38+
include::../gradle/publishing/maven.gradle[tags=upload]
3639
----
3740

3841
[source,kotlin,indent=0,subs="verbatim,attributes",role="secondary"]
3942
.Kotlin
4043
----
41-
include::../gradle/publishing/maven-publish.gradle.kts[tags=publishing]
44+
include::../gradle/publishing/maven.gradle.kts[tags=upload]
4245
----
4346

4447

0 commit comments

Comments
 (0)