[[publishing-your-application]]
== Publishing your application



[[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"]
----
include::../gradle/publishing/maven.gradle[tags=upload]
----

[[publishing-your-application-maven-publish]]
=== Publishing with the `maven-publish` plugin

When the {java-plugin}[`java` plugin] is applied Spring Boot automatically creates a
{software-component}[software component] named `bootJava`. Similarly, when the `war`
plugin is applied, a software component named `bootWeb` is created. `bootJava` contains
the archive produced by the `bootJar` task and `bootWeb` contains the archive provided by
the `bootWar` task. The components can be used with the
{maven-publish-plugin}[`maven-publish` plugin] to publish the archive, for example:

[source,groovy,indent=0,subs="verbatim"]
----
include::../gradle/publishing/maven-publish.gradle[tags=publishing]
----



[[publishing-your-application-distribution]]
=== Distributing with the `application` plugin

When the {application-plugin}[`application` plugin] is applied a distribution named
`boot` is created. This distribution contains the archive produced by the `bootJar` or
`bootWar` task and scripts to launch it on Unix-like platforms and Windows. Zip and tar
distributions can be built by the `bootDistZip` and `bootDistTar` tasks respectively.
