Spring Boot Gradle Plugin: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Spring Boot Concepts =Overview= <syntaxhighlight lang='groovy'> apply plugin: 'org.springframework.boot' </s...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
* https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/html/
=Internal=
=Internal=


* [[Spring_Boot_Concepts#Spring_Boot_Gradle_Plugin|Spring Boot Concepts]]
* [[Spring_Boot_Concepts#Spring_Boot_Gradle_Plugin|Spring Boot Concepts]]
* [[Gradle_Plugins#Plugin_List|Gradle Plugins]]


=Overview=
=Overview=
Line 8: Line 13:
apply plugin: 'org.springframework.boot'
apply plugin: 'org.springframework.boot'
</syntaxhighlight>
</syntaxhighlight>
The plugin is responsible with:
* packaging executable jar or war archives
* run Spring Boot applications
* use the dependency management provided by spring-boot-dependencies.
=Packaging=
Executable JARs are created by the bootJar task. The task is automatically created with the [[Gradle_Java_Plugin#Overview|java plugin]] is applied. It is an instance of [https://docs.spring.io/spring-boot/docs/2.1.0.RELEASE/gradle-plugin/api/org/springframework/boot/gradle/tasks/bundling/BootJar.html BootJar]. bootJar can be configured with:
<syntaxhighlight lang='groovy'>
bootJar {
    // enable (default)/disable the task
    // enabled = true | false
}
</syntaxhighlight>
When bootJar or bootWar tasks are configured, the jar or war tasks are disabled. The jar task can be enabled with:
<syntaxhighlight lang='groovy'>
jar {
    enabled = true
}
</syntaxhighlight>
=Publishing=

Latest revision as of 23:23, 31 October 2018

External

Internal

Overview

apply plugin: 'org.springframework.boot'

The plugin is responsible with:

  • packaging executable jar or war archives
  • run Spring Boot applications
  • use the dependency management provided by spring-boot-dependencies.

Packaging

Executable JARs are created by the bootJar task. The task is automatically created with the java plugin is applied. It is an instance of BootJar. bootJar can be configured with:

bootJar {

    // enable (default)/disable the task
    // enabled = true | false
}


When bootJar or bootWar tasks are configured, the jar or war tasks are disabled. The jar task can be enabled with:

jar {

    enabled = true
}

Publishing