Spring Boot Gradle Plugin

From NovaOrdis Knowledge Base
Revision as of 23:23, 31 October 2018 by Ovidiu (talk | contribs) (→‎Packaging)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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