Encourage use of maven-publish plugin in Gradle docs

See gh-25299
This commit is contained in:
Robert Smith 2021-02-15 18:40:25 -05:00 committed by Andy Wilkinson
parent 29af4b953f
commit c0a5245a3e
1 changed files with 20 additions and 20 deletions

View File

@ -3,26 +3,6 @@
[[publishing-your-application-maven]]
=== Publishing with the Maven Plugin
When the {maven-plugin}[`maven` plugin] is applied, an `Upload` task for the `bootArchives` configuration named `uploadBootArchives` is automatically created.
By default, the `bootArchives` configuration contains the archive produced by the `bootJar` or `bootWar` task.
The `uploadBootArchives` task can be configured to publish the archive to a Maven repository:
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy
----
include::../gradle/publishing/maven.gradle[tags=upload]
----
[source,kotlin,indent=0,subs="verbatim,attributes",role="secondary"]
.Kotlin
----
include::../gradle/publishing/maven.gradle.kts[tags=upload]
----
[[publishing-your-application-maven-publish]]
=== Publishing with the Maven-publish Plugin
To publish your Spring Boot jar or war, add it to the publication using the `artifact` method on `MavenPublication`.
@ -43,6 +23,26 @@ include::../gradle/publishing/maven-publish.gradle.kts[tags=publishing]
[[publishing-your-application-maven]]
=== Publishing with the Maven Plugin
When the {maven-plugin}[`maven` plugin] is applied, an `Upload` task for the `bootArchives` configuration named `uploadBootArchives` is automatically created.
By default, the `bootArchives` configuration contains the archive produced by the `bootJar` or `bootWar` task.
The `uploadBootArchives` task can be configured to publish the archive to a Maven repository:
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy
----
include::../gradle/publishing/maven.gradle[tags=upload]
----
[source,kotlin,indent=0,subs="verbatim,attributes",role="secondary"]
.Kotlin
----
include::../gradle/publishing/maven.gradle.kts[tags=upload]
----
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.
[[publishing-your-application-distribution]]
=== Distributing with the Application Plugin
When the {application-plugin}[`application` plugin] is applied a distribution named `boot` is created.