Merge pull request #19896 from dreis2211
* pr/19896: Remove obsolete files Closes gh-19896pull/19907/head
commit
4f569d6ee7
@ -1,46 +0,0 @@
|
|||||||
<assembly>
|
|
||||||
<id>bin</id>
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
<format>tar.gz</format>
|
|
||||||
</formats>
|
|
||||||
<baseDirectory>spring-${project.version}</baseDirectory>
|
|
||||||
<includeBaseDirectory>true</includeBaseDirectory>
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory>src/main/content</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
<useDefaultExcludes>true</useDefaultExcludes>
|
|
||||||
<fileMode>644</fileMode>
|
|
||||||
<directoryMode>755</directoryMode>
|
|
||||||
<filtered>true</filtered>
|
|
||||||
<includes>
|
|
||||||
<include>INSTALL.txt</include>
|
|
||||||
</includes>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>src/main/content</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
<useDefaultExcludes>true</useDefaultExcludes>
|
|
||||||
<fileMode>644</fileMode>
|
|
||||||
<directoryMode>755</directoryMode>
|
|
||||||
<excludes>
|
|
||||||
<exclude>INSTALL.txt</exclude>
|
|
||||||
</excludes>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>src/main/executablecontent</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
<useDefaultExcludes>true</useDefaultExcludes>
|
|
||||||
<fileMode>755</fileMode>
|
|
||||||
<directoryMode>755</directoryMode>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
<files>
|
|
||||||
<file>
|
|
||||||
<source>${project.build.directory}/${project.artifactId}-${project.version}-full.jar</source>
|
|
||||||
<outputDirectory>lib</outputDirectory>
|
|
||||||
<destName>${project.build.finalName}.jar</destName>
|
|
||||||
</file>
|
|
||||||
</files>
|
|
||||||
</assembly>
|
|
@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<assembly
|
|
||||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 https://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
|
||||||
<id>full</id>
|
|
||||||
<formats>
|
|
||||||
<format>jar</format>
|
|
||||||
</formats>
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
<dependencySets>
|
|
||||||
<dependencySet>
|
|
||||||
<useProjectArtifact />
|
|
||||||
<includes>
|
|
||||||
<include>${project.groupId}:${project.artifactId}</include>
|
|
||||||
</includes>
|
|
||||||
<unpack>true</unpack>
|
|
||||||
<outputDirectory>BOOT-INF/classes/</outputDirectory>
|
|
||||||
</dependencySet>
|
|
||||||
</dependencySets>
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/assembly</directory>
|
|
||||||
<outputDirectory></outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
</assembly>
|
|
@ -1,31 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<xsl:stylesheet version="2.0"
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://maven.apache.org/POM/4.0.0"
|
|
||||||
exclude-result-prefixes="m">
|
|
||||||
<xsl:output method="xml" encoding="utf-8" indent="yes"
|
|
||||||
xslt:indent-amount="2" xmlns:xslt="http://xml.apache.org/xslt" />
|
|
||||||
<xsl:strip-space elements="*" />
|
|
||||||
<xsl:template match="@*|node()">
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates select="@*|node()" />
|
|
||||||
</xsl:copy>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="/m:project/m:properties">
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates select="node()">
|
|
||||||
<xsl:sort select="name()" />
|
|
||||||
</xsl:apply-templates>
|
|
||||||
</xsl:copy>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template
|
|
||||||
match="/m:project/m:dependencyManagement/m:dependencies/m:dependency/m:version/text()[. = '${revision}']">
|
|
||||||
<xsl:value-of select="/m:project/m:version/text()" />
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template
|
|
||||||
match="/m:project/m:build/m:pluginManagement/m:plugins/m:plugin/m:version/text()[. = '${revision}']">
|
|
||||||
<xsl:value-of select="/m:project/m:version/text()" />
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="/m:project/m:properties/m:revision" />
|
|
||||||
<xsl:template match="/m:project/m:properties/m:main.basedir" />
|
|
||||||
<xsl:template match="/m:project/m:distributionManagement" />
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,6 +0,0 @@
|
|||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
|
|
||||||
<xsl:template match="/">
|
|
||||||
<xsl:copy-of select="projects/*[1]" />
|
|
||||||
<xsl:copy-of select="*[local-name()='project']" />
|
|
||||||
</xsl:template>
|
|
||||||
</xsl:stylesheet>
|
|
@ -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) }
|
|
@ -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()
|
|
@ -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) })
|
|
@ -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<File> 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<String> importedAutoConfiguration
|
|
||||||
|
|
||||||
TestSlice(String annotationName, Collection<String> importedAutoConfiguration) {
|
|
||||||
this.name = ClassUtils.getShortName(annotationName)
|
|
||||||
this.importedAutoConfiguration = new TreeSet<String>(importedAutoConfiguration)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<TestSlice> 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<String> getImportedAutoConfiguration(Properties springFactories, AnnotationMetadata annotationMetadata) {
|
|
||||||
Set<String> 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<String> 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<TestSlice> 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<TestSlice> testSlices = createTestSlices(new Project(new File(project.build.directory, 'test-auto-config')))
|
|
||||||
writeTestSlicesTable(testSlices)
|
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
xmlns:mvn="http://maven.apache.org/POM/4.0.0"
|
|
||||||
version="1.0">
|
|
||||||
|
|
||||||
<xsl:output method="text" encoding="UTF-8" indent="no"/>
|
|
||||||
<xsl:key name="by-full-name" match="//mvn:dependency" use="concat(mvn:groupId, '.', mvn:artifactId)"/>
|
|
||||||
<xsl:template match="/">
|
|
||||||
<xsl:text>|===
</xsl:text>
|
|
||||||
<xsl:text>| Group ID | Artifact ID | Version
</xsl:text>
|
|
||||||
<xsl:for-each select="//mvn:dependency[generate-id() = generate-id(key('by-full-name',
|
|
||||||
concat(mvn:groupId, '.', mvn:artifactId))[1])]">
|
|
||||||
<xsl:sort select="mvn:groupId"/>
|
|
||||||
<xsl:sort select="mvn:artifactId"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
|
||||||
<xsl:text>| `</xsl:text>
|
|
||||||
<xsl:copy-of select="mvn:groupId"/>
|
|
||||||
<xsl:text>`
</xsl:text>
|
|
||||||
<xsl:text>| `</xsl:text>
|
|
||||||
<xsl:copy-of select="mvn:artifactId"/>
|
|
||||||
<xsl:text>`
</xsl:text>
|
|
||||||
<xsl:text>| </xsl:text>
|
|
||||||
<xsl:copy-of select="mvn:version"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
|
||||||
</xsl:for-each>
|
|
||||||
<xsl:text>|===</xsl:text>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
xmlns:mvn="http://maven.apache.org/POM/4.0.0"
|
|
||||||
version="1.0">
|
|
||||||
|
|
||||||
<xsl:output method="text" encoding="UTF-8" indent="no"/>
|
|
||||||
<xsl:key name="by-full-name" match="//mvn:dependency" use="concat(mvn:groupId, '.', mvn:artifactId)"/>
|
|
||||||
<xsl:template match="/">
|
|
||||||
<xsl:for-each select="//mvn:dependency[generate-id() = generate-id(key('by-full-name',
|
|
||||||
concat(mvn:groupId, '.', mvn:artifactId))[1])]">
|
|
||||||
<xsl:sort select="mvn:groupId"/>
|
|
||||||
<xsl:sort select="mvn:artifactId"/>
|
|
||||||
<xsl:text>flattenedpom.version.</xsl:text>
|
|
||||||
<xsl:copy-of select="mvn:groupId"/>
|
|
||||||
<xsl:text>.</xsl:text>
|
|
||||||
<xsl:copy-of select="mvn:artifactId"/>
|
|
||||||
<xsl:text>=</xsl:text>
|
|
||||||
<xsl:copy-of select="mvn:version"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<xsl:stylesheet version="2.0"
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://maven.apache.org/POM/4.0.0"
|
|
||||||
exclude-result-prefixes="m">
|
|
||||||
<xsl:output method="xml" encoding="utf-8" indent="yes"
|
|
||||||
xslt:indent-amount="2" xmlns:xslt="http://xml.apache.org/xslt" />
|
|
||||||
<xsl:strip-space elements="*" />
|
|
||||||
<xsl:template match="@*|node()">
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates select="@*|node()" />
|
|
||||||
</xsl:copy>
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template
|
|
||||||
match="/m:project/m:build/m:pluginManagement/m:plugins/m:plugin/m:dependencies/m:dependency/m:version/text()[. = '${revision}']">
|
|
||||||
<xsl:value-of select="/m:project/m:version/text()" />
|
|
||||||
</xsl:template>
|
|
||||||
<xsl:template match="/m:project/m:properties/m:main.basedir" />
|
|
||||||
<xsl:template match="/m:project/m:groupId" />
|
|
||||||
<xsl:template match="/m:project/m:version" />
|
|
||||||
<xsl:template match="/m:project/m:build/m:plugins" />
|
|
||||||
<xsl:template match="/m:project/m:licenses" />
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,22 +0,0 @@
|
|||||||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 https://maven.apache.org/xsd/assembly-1.1.3.xsd">
|
|
||||||
<id>starter-poms</id>
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
</formats>
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
|
||||||
<moduleSets>
|
|
||||||
<moduleSet>
|
|
||||||
<sources>
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<includes>
|
|
||||||
<include>**/pom.xml</include>
|
|
||||||
</includes>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
</sources>
|
|
||||||
</moduleSet>
|
|
||||||
</moduleSets>
|
|
||||||
</assembly>
|
|
Loading…
Reference in New Issue