What is the syntax "tag :: ..." in the spring boot gradle file?

When using Spring Boot and Gradle, there are some comments in closing dependencies, such as "tag :: jetty []" and "end :: jetty []". Given their syntax, I assume they are parsed using something like the Spring boot gradle plugin. What are they doing? Are they required for the Spring actuator and integrated berth to operate?

Example docs below (see closing dependencies):

buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.10.RELEASE") } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'spring-boot' jar { baseName = 'gs-spring-boot' version = '0.1.0' } repositories { mavenCentral() } dependencies { // tag::jetty[] compile("org.springframework.boot:spring-boot-starter-web") { exclude module: "spring-boot-starter-tomcat" } compile("org.springframework.boot:spring-boot-starter-jetty") // end::jetty[] // tag::actuator[] compile("org.springframework.boot:spring-boot-starter-actuator") // end::actuator[] testCompile("junit:junit") } task wrapper(type: Wrapper) { gradleVersion = '1.11' } 
+5
source share
1 answer

As mentioned at the bottom of the Gradle Spring.io Getting Started Guide :

Note It has many built-in comments. This allows you to extract the bits of the assembly file into this manual for the detailed explanations above. You do not need them in your build assembly file.

No, you do not need tags. They are simply designed to automatically update manual bits when changing code.

+9
source

Source: https://habr.com/ru/post/1210995/


All Articles