Previously, Maven repositories definition was specified in a profile that is active by default. It means that as soon as any profile is enabled by the user, said profile is no longer enabled. This has the nasty consequences of having copy/paste in several places to make sure our own profiles still have the proper repositories definition. This commit creates a single "repositories" profile that is always active unless a given property is explicitely specified. This allows to remove the duplication and make things more consistent. Some Gradle-specific repositories were also hard-coded in two modules without any profile at all, meaning they were polluting the build of anybody using it. While the impacted modules are gradle specific, that repository has been shared in the new "repositories" profile as well. Closes gh-6031
277 lines
8.5 KiB
XML
277 lines
8.5 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-build</artifactId>
|
|
<version>1.4.0.BUILD-SNAPSHOT</version>
|
|
<packaging>pom</packaging>
|
|
<name>Spring Boot Build</name>
|
|
<description>Spring Boot Build</description>
|
|
<url>http://projects.spring.io/spring-boot/</url>
|
|
<organization>
|
|
<name>Pivotal Software, Inc.</name>
|
|
<url>http://www.spring.io</url>
|
|
</organization>
|
|
<licenses>
|
|
<license>
|
|
<name>Apache License, Version 2.0</name>
|
|
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
|
</license>
|
|
</licenses>
|
|
<scm>
|
|
<url>https://github.com/spring-projects/spring-boot</url>
|
|
</scm>
|
|
<developers>
|
|
<developer>
|
|
<id>pwebb</id>
|
|
<name>Phillip Webb</name>
|
|
<email>pwebb at pivotal.io</email>
|
|
<organization>Pivotal Software, Inc.</organization>
|
|
<organizationUrl>http://www.spring.io</organizationUrl>
|
|
<roles>
|
|
<role>Project lead</role>
|
|
</roles>
|
|
</developer>
|
|
<developer>
|
|
<id>dsyer</id>
|
|
<name>Dave Syer</name>
|
|
<email>dsyer at pivotal.io</email>
|
|
<organization>Pivotal Software, Inc.</organization>
|
|
<organizationUrl>http://www.spring.io</organizationUrl>
|
|
<roles>
|
|
<role>Project lead</role>
|
|
</roles>
|
|
</developer>
|
|
</developers>
|
|
<prerequisites>
|
|
<maven>3.2.1</maven>
|
|
</prerequisites>
|
|
<properties>
|
|
<main.basedir>${basedir}</main.basedir>
|
|
</properties>
|
|
<build>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
<version>1.7</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>2.17</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
|
<artifactId>replacer</artifactId>
|
|
<version>1.5.3</version>
|
|
</plugin>
|
|
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
<profiles>
|
|
<profile>
|
|
<id>default</id>
|
|
<activation>
|
|
<activeByDefault>true</activeByDefault>
|
|
</activation>
|
|
<modules>
|
|
<module>spring-boot-dependencies</module>
|
|
<module>spring-boot-parent</module>
|
|
<module>spring-boot-tools</module>
|
|
<module>spring-boot</module>
|
|
<module>spring-boot-test</module>
|
|
<module>spring-boot-autoconfigure</module>
|
|
<module>spring-boot-test-autoconfigure</module>
|
|
<module>spring-boot-actuator</module>
|
|
<module>spring-boot-devtools</module>
|
|
<module>spring-boot-docs</module>
|
|
<module>spring-boot-starters</module>
|
|
<module>spring-boot-actuator-docs</module>
|
|
<module>spring-boot-cli</module>
|
|
</modules>
|
|
</profile>
|
|
<profile>
|
|
<id>integration</id>
|
|
<activation>
|
|
<activeByDefault>true</activeByDefault>
|
|
</activation>
|
|
<modules>
|
|
<module>spring-boot-integration-tests</module>
|
|
</modules>
|
|
</profile>
|
|
<profile>
|
|
<id>prepare</id>
|
|
<modules>
|
|
<module>spring-boot-dependencies</module>
|
|
<module>spring-boot-parent</module>
|
|
<module>spring-boot-tools</module>
|
|
</modules>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>ant-contrib</groupId>
|
|
<artifactId>ant-contrib</artifactId>
|
|
<version>1.0b3</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>ant</groupId>
|
|
<artifactId>ant</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.ant</groupId>
|
|
<artifactId>ant-nodeps</artifactId>
|
|
<version>1.8.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.tigris.antelope</groupId>
|
|
<artifactId>antelopetasks</artifactId>
|
|
<version>3.2.10</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<executions>
|
|
<execution>
|
|
<id>generate-settings.xml</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
<inherited>false</inherited>
|
|
<configuration>
|
|
<target>
|
|
<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" />
|
|
<stringutil string="${version-type}" property="profile">
|
|
<lowercase />
|
|
</stringutil>
|
|
<echo message="Writing settings for ${profile} profile" />
|
|
<copy file=".settings-template.xml" tofile="settings.xml" overwrite="true">
|
|
<filterset>
|
|
<filter token="profile" value="${profile}" />
|
|
</filterset>
|
|
</copy>
|
|
</target>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>fixup-dependencies-pom</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
<inherited>false</inherited>
|
|
<configuration>
|
|
<target>
|
|
<property name="sourceFile" value="spring-boot-dependencies/pom.xml" />
|
|
<xslt in="${sourceFile}" out="${sourceFile}.new" force="true">
|
|
<style>
|
|
<string><![CDATA[
|
|
<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:template match="node()|@*">
|
|
<xsl:copy>
|
|
<xsl:apply-templates select="node()|@*" />
|
|
</xsl:copy>
|
|
</xsl:template>
|
|
|
|
<xsl:template
|
|
match="m:build/m:pluginManagement/m:plugins/m:plugin[m:groupId/text() = 'org.springframework.boot']/m:version/text()">
|
|
<xsl:value-of select="/m:project/m:version/text()"/>
|
|
</xsl:template>
|
|
</xsl:stylesheet>
|
|
]]>
|
|
</string>
|
|
</style>
|
|
</xslt>
|
|
<move file="${sourceFile}" tofile="${sourceFile}.old" />
|
|
<move file="${sourceFile}.new" tofile="${sourceFile}" />
|
|
<delete file="${sourceFile}.old" />
|
|
</target>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
|
<artifactId>replacer</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>fixup-gradle-samples</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includes>
|
|
<include>${basedir}/spring-boot-samples/**/build.gradle</include>
|
|
</includes>
|
|
<token>springBootVersion\s+.*+</token>
|
|
<value>springBootVersion = '${project.version}'</value>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>fixup-ant-samples</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includes>
|
|
<include>${basedir}/spring-boot-samples/**/build.xml</include>
|
|
</includes>
|
|
<token>spring-boot\.version\"\s.*+</token>
|
|
<value>spring-boot.version" value="${project.version}" /></value>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>ci</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
|
<artifactId>replacer</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>remove-repo-samples</id>
|
|
<goals>
|
|
<goal>replace</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includes>
|
|
<include>${basedir}/spring-boot-dependencies/pom.xml</include>
|
|
</includes>
|
|
<regexFlags>
|
|
<regexFlag>DOTALL</regexFlag>
|
|
</regexFlags>
|
|
<token>\n\t<profiles>.*</profiles></token>
|
|
<value />
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|