diff --git a/spring-boot-project/spring-boot-cli/src/main/assembly/bin-package.xml b/spring-boot-project/spring-boot-cli/src/main/assembly/bin-package.xml deleted file mode 100644 index ecba6fd1ce..0000000000 --- a/spring-boot-project/spring-boot-cli/src/main/assembly/bin-package.xml +++ /dev/null @@ -1,46 +0,0 @@ - - bin - - zip - tar.gz - - spring-${project.version} - true - - - src/main/content - - true - 644 - 755 - true - - INSTALL.txt - - - - src/main/content - - true - 644 - 755 - - INSTALL.txt - - - - src/main/executablecontent - - true - 755 - 755 - - - - - ${project.build.directory}/${project.artifactId}-${project.version}-full.jar - lib - ${project.build.finalName}.jar - - - diff --git a/spring-boot-project/spring-boot-cli/src/main/assembly/jar-with-dependencies.xml b/spring-boot-project/spring-boot-cli/src/main/assembly/jar-with-dependencies.xml deleted file mode 100644 index 4a4dcdfc69..0000000000 --- a/spring-boot-project/spring-boot-cli/src/main/assembly/jar-with-dependencies.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - full - - jar - - false - - - - - ${project.groupId}:${project.artifactId} - - true - BOOT-INF/classes/ - - - - - ${project.build.directory}/assembly - - - - diff --git a/spring-boot-project/spring-boot-dependencies/src/main/xslt/post-process-flattened-pom.xsl b/spring-boot-project/spring-boot-dependencies/src/main/xslt/post-process-flattened-pom.xsl deleted file mode 100644 index 22cbd772e9..0000000000 --- a/spring-boot-project/spring-boot-dependencies/src/main/xslt/post-process-flattened-pom.xsl +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-boot-project/spring-boot-dependencies/src/main/xslt/single-project.xsl b/spring-boot-project/spring-boot-dependencies/src/main/xslt/single-project.xsl deleted file mode 100644 index 6ceb1e59f8..0000000000 --- a/spring-boot-project/spring-boot-dependencies/src/main/xslt/single-project.xsl +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/spring-boot-project/spring-boot-docs/src/main/groovy/generateAutoConfigurationClassTables.groovy b/spring-boot-project/spring-boot-docs/src/main/groovy/generateAutoConfigurationClassTables.groovy deleted file mode 100644 index 5a94817491..0000000000 --- a/spring-boot-project/spring-boot-docs/src/main/groovy/generateAutoConfigurationClassTables.groovy +++ /dev/null @@ -1,41 +0,0 @@ -def processModule(File moduleDir, File generatedResourcesDir) { - def moduleName = moduleDir.name - def factoriesFile = new File(moduleDir, 'META-INF/spring.factories') - new File(generatedResourcesDir, "auto-configuration-classes-${moduleName}.adoc") - .withPrintWriter { - generateAutoConfigurationClassTable(moduleName, factoriesFile, it) - } -} - -def generateAutoConfigurationClassTable(String module, File factories, PrintWriter writer) { - writer.println '[cols="4,1"]' - writer.println '|===' - writer.println '| Configuration Class | Links' - - getAutoConfigurationClasses(factories).each { - writer.println '' - writer.println "| {spring-boot-code}/spring-boot-project/${module}/src/main/java/${it.path}.java[`${it.name}`]" - writer.println "| {spring-boot-api}/${it.path}.html[javadoc]" - } - - writer.println '|===' -} - -def getAutoConfigurationClasses(File factories) { - factories.withInputStream { - def properties = new Properties() - properties.load(it) - properties.get('org.springframework.boot.autoconfigure.EnableAutoConfiguration') - .split(',') - .collect { - def path = it.replace('.', '/') - def name = it.substring(it.lastIndexOf('.') + 1) - [ 'path': path, 'name': name] - } - .sort {a, b -> a.name.compareTo(b.name)} - } -} - -def autoConfigDir = new File(project.build.directory, 'auto-config') -def generatedResourcesDir = new File(project.build.directory, 'generated-resources') -autoConfigDir.eachDir { processModule(it, generatedResourcesDir) } diff --git a/spring-boot-project/spring-boot-docs/src/main/groovy/generateConfigurationPropertyTables.groovy b/spring-boot-project/spring-boot-docs/src/main/groovy/generateConfigurationPropertyTables.groovy deleted file mode 100644 index 50c31b55dd..0000000000 --- a/spring-boot-project/spring-boot-docs/src/main/groovy/generateConfigurationPropertyTables.groovy +++ /dev/null @@ -1,81 +0,0 @@ -import org.springframework.boot.configurationdocs.ConfigurationMetadataDocumentWriter -import org.springframework.boot.configurationdocs.DocumentOptions -import org.springframework.core.io.UrlResource - -import java.nio.file.Path -import java.nio.file.Paths - -def getConfigMetadataInputStreams() { - def mainMetadata = getClass().getClassLoader().getResources("META-INF/spring-configuration-metadata.json") - def additionalMetadata = getClass().getClassLoader().getResources("META-INF/additional-spring-configuration-metadata.json") - def streams = [] - streams += mainMetadata.collect { new UrlResource(it).getInputStream() } - streams += additionalMetadata.collect { new UrlResource(it).getInputStream() } - return streams -} - -def generateConfigMetadataDocumentation() { - - def streams = getConfigMetadataInputStreams() - try { - Path outputPath = Paths.get(project.build.directory, 'generated-resources', 'config-docs') - def builder = DocumentOptions.builder(); - - builder - .addSection("core") - .withKeyPrefixes("debug", "trace", "logging", "spring.aop", "spring.application", - "spring.autoconfigure", "spring.banner", "spring.beaninfo", "spring.codec", "spring.config", - "spring.info", "spring.jmx", "spring.main", "spring.messages", "spring.pid", - "spring.profiles", "spring.quartz", "spring.reactor", "spring.task", - "spring.mandatory-file-encoding", "info", "spring.output.ansi.enabled") - .addSection("mail") - .withKeyPrefixes("spring.mail", "spring.sendgrid") - .addSection("cache") - .withKeyPrefixes("spring.cache") - .addSection("server") - .withKeyPrefixes("server") - .addSection("web") - .withKeyPrefixes("spring.hateoas", - "spring.servlet", "spring.jersey", - "spring.mvc", "spring.resources", "spring.webflux") - .addSection("json") - .withKeyPrefixes("spring.jackson", "spring.gson") - .addSection("rsocket") - .withKeyPrefixes("spring.rsocket") - .addSection("templating") - .withKeyPrefixes("spring.freemarker", "spring.groovy", "spring.mustache", "spring.thymeleaf") - .addOverride("spring.groovy.template.configuration", "See GroovyMarkupConfigurer") - .addSection("security") - .withKeyPrefixes("spring.security", "spring.ldap", "spring.session") - .addSection("data-migration") - .withKeyPrefixes("spring.flyway", "spring.liquibase") - .addSection("data") - .withKeyPrefixes("spring.couchbase", "spring.elasticsearch", "spring.h2", - "spring.influx", "spring.mongodb", "spring.redis", - "spring.dao", "spring.data", "spring.datasource", "spring.jooq", - "spring.jdbc", "spring.jpa") - .addOverride("spring.datasource.dbcp2", "Commons DBCP2 specific settings") - .addOverride("spring.datasource.tomcat", "Tomcat datasource specific settings") - .addOverride("spring.datasource.hikari", "Hikari specific settings") - .addSection("transaction") - .withKeyPrefixes("spring.jta", "spring.transaction") - .addSection("integration") - .withKeyPrefixes("spring.activemq", "spring.artemis", "spring.batch", - "spring.integration", "spring.jms", "spring.kafka", "spring.rabbitmq", "spring.hazelcast", - "spring.webservices") - .addSection("actuator") - .withKeyPrefixes("management") - .addSection("devtools") - .withKeyPrefixes("spring.devtools") - .addSection("testing") - .withKeyPrefixes("spring.test"); - - ConfigurationMetadataDocumentWriter writer = new ConfigurationMetadataDocumentWriter(); - writer.writeDocument(outputPath, builder.build(), streams.toArray(new InputStream[0])); - } - finally { - streams.each { it.close() } - } -} - -generateConfigMetadataDocumentation() \ No newline at end of file diff --git a/spring-boot-project/spring-boot-docs/src/main/groovy/generateStarterTables.groovy b/spring-boot-project/spring-boot-docs/src/main/groovy/generateStarterTables.groovy deleted file mode 100644 index b1c7d9a4ac..0000000000 --- a/spring-boot-project/spring-boot-docs/src/main/groovy/generateStarterTables.groovy +++ /dev/null @@ -1,76 +0,0 @@ -import groovy.util.XmlSlurper - -def getStarters(File dir) { - def starters = [] - new File(project.build.directory, 'external-resources/starter-poms').eachDir { starterDir -> - def pom = new XmlSlurper().parse(new File(starterDir, 'pom.xml')) - def dependencies = getDependencies(pom) - if (isStarter(dependencies)) { - def name = pom.artifactId.text() - starters << [ - 'name': name, - 'description': postProcessDescription(pom.description.text()), - 'dependencies': dependencies, - 'pomUrl': "{spring-boot-code}/spring-boot-project/spring-boot-starters/$name/pom.xml" - ] - } - } - return starters.sort { it.name } -} - -boolean isApplicationStarter(def starter) { - !isTechnicalStarter(starter) && !isProductionStarter(starter) -} - -boolean isTechnicalStarter(def starter) { - starter.name != 'spring-boot-starter-test' && !isProductionStarter(starter) && - starter.dependencies.find { - it.startsWith('org.springframework.boot:spring-boot-starter') } == null -} - -boolean isProductionStarter(def starter) { - starter.name in ['spring-boot-starter-actuator'] -} - -boolean isStarter(def dependencies) { - !dependencies.empty -} - -def postProcessDescription(String description) { - addStarterCrossLinks(removeExtraWhitespace(description)) -} - -def removeExtraWhitespace(String input) { - input.replaceAll('\\s+', ' ') -} - -def addStarterCrossLinks(String input) { - input.replaceAll('(spring-boot-starter[A-Za-z-]*)', '<<$1,`$1`>>') -} - -def getDependencies(def pom) { - dependencies = [] - pom.dependencies.dependency.each { dependency -> - dependencies << "${dependency.groupId.text()}:${dependency.artifactId.text()}" - } - dependencies -} - -def writeTable(String name, def starters) { - new File(project.build.directory, "generated-resources/${name}.adoc").withPrintWriter { writer -> - writer.println '|===' - writer.println '| Name | Description | Pom' - starters.each { starter -> - writer.println '' - writer.println "| [[${starter.name}]]`${starter.name}`" - writer.println "| ${starter.description}" - writer.println "| ${starter.pomUrl}[Pom]" - } - writer.println '|===' - } -} - -def starters = getStarters(new File(project.build.directory, 'external-resources/starter-poms')) -writeTable('application-starters', starters.findAll { isApplicationStarter(it) }) -writeTable('production-starters', starters.findAll { isProductionStarter(it) }) -writeTable('technical-starters', starters.findAll { isTechnicalStarter(it) }) diff --git a/spring-boot-project/spring-boot-docs/src/main/groovy/generateTestSlicesTable.groovy b/spring-boot-project/spring-boot-docs/src/main/groovy/generateTestSlicesTable.groovy deleted file mode 100644 index 3da1826a02..0000000000 --- a/spring-boot-project/spring-boot-docs/src/main/groovy/generateTestSlicesTable.groovy +++ /dev/null @@ -1,117 +0,0 @@ -import groovy.io.FileType - -import java.util.Properties - -import org.springframework.core.io.InputStreamResource -import org.springframework.core.type.AnnotationMetadata -import org.springframework.core.type.ClassMetadata -import org.springframework.core.type.classreading.MetadataReader -import org.springframework.core.type.classreading.MetadataReaderFactory -import org.springframework.core.type.classreading.SimpleMetadataReaderFactory -import org.springframework.util.ClassUtils -import org.springframework.util.StringUtils - -class Project { - - final List classFiles - - final Properties springFactories - - Project(File rootDirectory) { - this.springFactories = loadSpringFactories(rootDirectory) - this.classFiles = [] - rootDirectory.eachFileRecurse (FileType.FILES) { file -> - if (file.name.endsWith('.class')) { - classFiles << file - } - } - } - - private static Properties loadSpringFactories(File rootDirectory) { - Properties springFactories = new Properties() - new File(rootDirectory, 'META-INF/spring.factories').withInputStream { inputStream -> - springFactories.load(inputStream) - } - return springFactories - } -} - -class TestSlice { - - final String name - - final SortedSet importedAutoConfiguration - - TestSlice(String annotationName, Collection importedAutoConfiguration) { - this.name = ClassUtils.getShortName(annotationName) - this.importedAutoConfiguration = new TreeSet(importedAutoConfiguration) - } -} - -List createTestSlices(Project project) { - MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory() - project.classFiles - .findAll { classFile -> - classFile.name.endsWith('Test.class') - }.collect { classFile -> - createMetadataReader(metadataReaderFactory, classFile) - }.findAll { metadataReader -> - metadataReader.classMetadata.annotation - }.collect { metadataReader -> - createTestSlice(project.springFactories, metadataReader.classMetadata, metadataReader.annotationMetadata) - }.sort { - a, b -> a.name.compareTo b.name - } -} - -MetadataReader createMetadataReader(MetadataReaderFactory factory, File classFile) { - classFile.withInputStream { inputStream -> - factory.getMetadataReader(new InputStreamResource(inputStream)) - } -} - -TestSlice createTestSlice(Properties springFactories, ClassMetadata classMetadata, AnnotationMetadata annotationMetadata) { - new TestSlice(classMetadata.className, getImportedAutoConfiguration(springFactories, annotationMetadata)) -} - -Set getImportedAutoConfiguration(Properties springFactories, AnnotationMetadata annotationMetadata) { - Set importers = findMetaImporters(annotationMetadata) - if (annotationMetadata.isAnnotated('org.springframework.boot.autoconfigure.ImportAutoConfiguration')) { - importers.add(annotationMetadata.className) - } - importers - .collect { autoConfigurationImporter -> - StringUtils.commaDelimitedListToSet(springFactories.get(autoConfigurationImporter)) - }.flatten() -} - -Set findMetaImporters(AnnotationMetadata annotationMetadata) { - annotationMetadata.annotationTypes - .findAll { annotationType -> - isAutoConfigurationImporter(annotationType, annotationMetadata) - } -} - -boolean isAutoConfigurationImporter(String annotationType, AnnotationMetadata metadata) { - metadata.getMetaAnnotationTypes(annotationType).contains('org.springframework.boot.autoconfigure.ImportAutoConfiguration') -} - -void writeTestSlicesTable(List testSlices) { - new File(project.build.directory, "generated-resources/test-slice-auto-configuration.adoc").withPrintWriter { writer -> - writer.println '[cols="d,a"]' - writer.println '|===' - writer.println '| Test slice | Imported auto-configuration' - testSlices.each { testSlice -> - writer.println '' - writer.println "| `@${testSlice.name}`" - writer.print '| ' - testSlice.importedAutoConfiguration.each { - writer.println "`${it}`" - } - } - writer.println '|===' - } -} - -List testSlices = createTestSlices(new Project(new File(project.build.directory, 'test-auto-config'))) -writeTestSlicesTable(testSlices) diff --git a/spring-boot-project/spring-boot-docs/src/main/xslt/dependencyVersions.xsl b/spring-boot-project/spring-boot-docs/src/main/xslt/dependencyVersions.xsl deleted file mode 100644 index 1920ac831b..0000000000 --- a/spring-boot-project/spring-boot-docs/src/main/xslt/dependencyVersions.xsl +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - |=== - | Group ID | Artifact ID | Version - - - - - | ` - - ` - | ` - - ` - | - - - - |=== - - - diff --git a/spring-boot-project/spring-boot-docs/src/main/xslt/versionProperties.xsl b/spring-boot-project/spring-boot-docs/src/main/xslt/versionProperties.xsl deleted file mode 100644 index f08f48949a..0000000000 --- a/spring-boot-project/spring-boot-docs/src/main/xslt/versionProperties.xsl +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - flattenedpom.version. - - . - - = - - - - - - diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/src/main/xslt/post-process-flattened-pom.xsl b/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/src/main/xslt/post-process-flattened-pom.xsl deleted file mode 100644 index dff3f1f849..0000000000 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/src/main/xslt/post-process-flattened-pom.xsl +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/spring-boot-project/spring-boot-starters/src/main/assembly/starter-poms-assembly.xml b/spring-boot-project/spring-boot-starters/src/main/assembly/starter-poms-assembly.xml deleted file mode 100644 index dc90e356e2..0000000000 --- a/spring-boot-project/spring-boot-starters/src/main/assembly/starter-poms-assembly.xml +++ /dev/null @@ -1,22 +0,0 @@ - - starter-poms - - zip - - false - - - - - - - **/pom.xml - - - - - - -