Files
spring-vault/spring-vault-distribution/pom.xml
2024-07-31 15:47:33 +02:00

343 lines
9.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-vault-distribution</artifactId>
<packaging>pom</packaging>
<name>Spring Vault - Distribution</name>
<description>Distribution build for Spring Vault</description>
<parent>
<groupId>org.springframework.vault</groupId>
<artifactId>spring-vault-parent</artifactId>
<version>3.2.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
<project.root>${basedir}/..</project.root>
</properties>
<build>
<resources>
<resource>
<directory>${project.basedir}/../src/main/antora/resources/antora-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>antora-process-resources</id>
<build>
<plugins>
<plugin>
<groupId>io.spring.maven.antora</groupId>
<artifactId>antora-component-version-maven-plugin</artifactId>
<version>${antora.version}</version>
<executions>
<execution>
<goals>
<goal>antora-component-version</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>export-properties</id>
<phase>generate-resources</phase>
<configuration>
<target>
<loadresource property="spring.version.short">
<concat>${spring.version}</concat>
<filterchain>
<replaceregex pattern="([\d]+\.[\d]+)(\..*)" replace="\1" />
</filterchain>
</loadresource>
</target>
<exportAntProperties>true</exportAntProperties>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>antora</id>
<properties>
<maven.main.skip>true</maven.main.skip>
<maven.test.skip>true</maven.test.skip>
<aspectj.skip>true</aspectj.skip>
<maven.install.skip>true</maven.install.skip>
<skipTests>true</skipTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.antora</groupId>
<artifactId>antora-maven-plugin</artifactId>
<version>${maven.antora-version}</version>
<extensions>true</extensions>
<configuration>
<playbook>${project.basedir}/../src/main/antora/antora-playbook.yml</playbook>
<options>
<option>--to-dir=target/antora/site</option>
<option>--stacktrace</option>
<option>--fetch</option>
</options>
</configuration>
<executions>
<execution>
<goals>
<goal>antora</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--
Profile to be activated when building the distribution atrifacts.
Generates reference documentation, aggregates JavaDoc etc. Has to be combined with
profiles "release" or "milestone" to deploy artifacts into the appropriate places.
-->
<id>distribute</id>
<properties>
<shared.resources>${project.build.directory}/shared-resources
</shared.resources>
</properties>
<repositories>
<repository>
<id>spring-libs-milestone</id>
<url>https://repo.spring.io/libs-milestone</url>
</repository>
</repositories>
<build>
<plugins>
<!--
Provide shared resources for Javadoc and Asciidoc.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-shared-resources</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<includeGroupIds>org.springframework.data
</includeGroupIds>
<includeArtifactIds>spring-data-build-resources
</includeArtifactIds>
<includeTypes>zip</includeTypes>
<excludeTransitive>true</excludeTransitive>
<outputDirectory>${shared.resources}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--
Copies all namespaces schemas to target/schemas flatten the directory structure.
Depended on by the site.xml assembly descriptor.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>collect-schema-files</id>
<phase>prepare-package</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/schemas">
<fileset dir="${basedir}" erroronmissingdir="false">
<include name="**/src/main/resources/**/config/spring-*.xsd" />
</fileset>
<flattenmapper />
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>copy-javadoc</id>
<phase>package</phase>
<configuration>
<target>
<copy todir="${project.root}/target/antora/modules/ROOT/assets/attachments/api/java">
<fileset dir="${project.root}/target/site/apidocs" erroronmissingdir="true" />
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>docs</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>src/assembly/docs.xml</descriptor>
</descriptors>
<finalName>spring-vault-${project.version}-docs
</finalName>
<appendAssemblyId>false</appendAssemblyId>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
<!-- Deploy to Artifactory -->
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>deploy-docs</id>
<goals>
<goal>publish</goal>
</goals>
<phase>deploy</phase>
<configuration>
<artifactory>
<includeEnvVars>false</includeEnvVars>
</artifactory>
<deployProperties>
<zip.name>spring-vault</zip.name>
<zip.displayname>spring-vault</zip.displayname>
<zip.deployed>false</zip.deployed>
<zip.type>docs</zip.type>
</deployProperties>
<buildInfo>
<!-- Retain only a single build -->
<buildName>Spring Vault Docs ${project.version}</buildName>
<buildRetentionCount>1</buildRetentionCount>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<publisher>
<contextUrl>{{artifactory.server}}</contextUrl>
<username>{{artifactory.username}}</username>
<password>{{artifactory.password}}</password>
<repoKey>{{artifactory.staging-repository}}</repoKey>
<snapshotRepoKey>{{artifactory.staging-repository}}</snapshotRepoKey>
<includePatterns>*.zip</includePatterns>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<pluginRepositories>
<pluginRepository>
<id>bintray-plugins</id>
<name>bintray-plugins</name>
<url>https://jcenter.bintray.com</url>
</pluginRepository>
<pluginRepository>
<id>spring-plugins-release</id>
<url>https://repo.spring.io/plugins-release</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>