Fix POMs for the updated build/release process

Fix POMs following project relocations and apply CI friendly Maven
conventions.

See gh-9316
This commit is contained in:
Phillip Webb
2017-05-31 14:27:23 -07:00
parent 89b0ba2c14
commit b87f9c11f1
85 changed files with 1219 additions and 1746 deletions

View File

@@ -1,22 +1,18 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-tools</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<version>${revision}</version>
</parent>
<artifactId>spring-boot-gradle-plugin</artifactId>
<packaging>pom</packaging>
<name>Spring Boot Gradle Plugin</name>
<description>Spring Boot Gradle Plugin</description>
<url>http://projects.spring.io/spring-boot/</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>http://www.spring.io</url>
</organization>
<properties>
<main.basedir>${basedir}/../..</main.basedir>
<main.basedir>${basedir}/../../..</main.basedir>
<gradle.executable>./gradlew</gradle.executable>
<gradle.task>build</gradle.task>
</properties>
@@ -37,15 +33,31 @@
<build>
<plugins>
<plugin>
<artifactId>maven-help-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<id>copy-compile-dependencies</id>
<phase>generate-resources</phase>
<goals>
<goal>effective-pom</goal>
<goal>copy-dependencies</goal>
</goals>
<inherited>false</inherited>
<configuration>
<output>${project.build.directory}/effective-pom.xml</output>
<includeScope>compile</includeScope>
<outputDirectory>${project.build.directory}/dependencies/compile</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-test-dependencies</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<inherited>false</inherited>
<configuration>
<includeScope>test</includeScope>
<outputDirectory>${project.build.directory}/dependencies/test</outputDirectory>
</configuration>
</execution>
</executions>
@@ -132,6 +144,11 @@
</profile>
<profile>
<id>full</id>
<activation>
<property>
<name>full</name>
</property>
</activation>
<build>
<plugins>
<plugin>
@@ -173,12 +190,17 @@
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" />
<var name="version-type" value="${project.version}" />
<propertyregex property="version-type" override="true" input="${version-type}" regexp=".*\.(.*)" replace="\1" />
<propertyregex property="version-type" override="true" input="${version-type}" regexp="(M)\d+" replace="MILESTONE" />
<propertyregex property="version-type" override="true" input="${version-type}" regexp="(RC)\d+" replace="MILESTONE" />
<propertyregex property="version-type" override="true" input="${version-type}" regexp="BUILD-(.*)" replace="SNAPSHOT" />
<propertyregex property="version-type" override="true"
input="${version-type}" regexp=".*\.(.*)" replace="\1" />
<propertyregex property="version-type" override="true"
input="${version-type}" regexp="(M)\d+" replace="MILESTONE" />
<propertyregex property="version-type" override="true"
input="${version-type}" regexp="(RC)\d+" replace="MILESTONE" />
<propertyregex property="version-type" override="true"
input="${version-type}" regexp="BUILD-(.*)" replace="SNAPSHOT" />
<var name="github-tag" value="v${project.version}" />
<propertyregex property="github-tag" override="true" input="${github-tag}" regexp=".*SNAPSHOT" replace="master" />
<propertyregex property="github-tag" override="true"
input="${github-tag}" regexp=".*SNAPSHOT" replace="master" />
</target>
</configuration>
</execution>
@@ -190,12 +212,18 @@
</goals>
<configuration>
<target>
<zip destfile="${project.build.directory}/${project.artifactId}-${project.version}-docs.zip">
<zipfileset src="build/libs/${project.artifactId}-${project.version}-javadoc.jar" prefix="api" />
<zipfileset dir="${project.build.directory}/generated-docs" includes="index.html" prefix="reference/html" />
<zip
destfile="${project.build.directory}/${project.artifactId}-${project.version}-docs.zip">
<zipfileset
src="build/libs/${project.artifactId}-${project.version}-javadoc.jar"
prefix="api" />
<zipfileset dir="${project.build.directory}/generated-docs"
includes="index.html" prefix="reference/html" />
<mappedresources>
<fileset dir="${project.build.directory}/generated-docs" includes="index.pdf" />
<globmapper from="index.pdf" to="reference/pdf/spring-boot-gradle-plugin-reference.pdf"/>
<fileset dir="${project.build.directory}/generated-docs"
includes="index.pdf" />
<globmapper from="index.pdf"
to="reference/pdf/spring-boot-gradle-plugin-reference.pdf" />
</mappedresources>
</zip>
</target>
@@ -206,7 +234,6 @@
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<id>generate-html-documentation</id>