Skip to content

Commit c0a5245

Browse files
robert-smith-911wilkinsona
authored andcommitted
Encourage use of maven-publish plugin in Gradle docs
See gh-25299
1 parent 29af4b9 commit c0a5245

File tree

1 file changed

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

1 file changed

+15
-15
lines changed

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

+15-15
Original file line numberDiff line numberDiff line change
@@ -3,45 +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+
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:
3131

3232
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
3333
.Groovy
3434
----
35-
include::../gradle/publishing/maven-publish.gradle[tags=publishing]
35+
include::../gradle/publishing/maven.gradle[tags=upload]
3636
----
3737

3838
[source,kotlin,indent=0,subs="verbatim,attributes",role="secondary"]
3939
.Kotlin
4040
----
41-
include::../gradle/publishing/maven-publish.gradle.kts[tags=publishing]
41+
include::../gradle/publishing/maven.gradle.kts[tags=upload]
4242
----
4343

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.
4545

4646
[[publishing-your-application-distribution]]
4747
=== Distributing with the Application Plugin

0 commit comments

Comments
 (0)