You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spring-boot/pom.xml

177 lines
5.3 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>0.5.0.BUILD-SNAPSHOT</version>
<packaging>pom</packaging>
<prerequisites>
<maven>3.0.0</maven>
</prerequisites>
<properties>
<main.basedir>${basedir}</main.basedir>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</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-autoconfigure</module>
<module>spring-boot-actuator</module>
<module>spring-boot-starters</module>
<module>spring-boot-cli</module>
Support @Grab without a version or group Usually, use of @Grab requires you to specify a group, module, and version when identifying a dependency. This can be done in two different ways: @Grab(group='alpha', module='bravo', version='1.0.0') @Grab('alpha:bravo:1.0.0') This commit allows users to only specify a module: the group is inferred and the version is the one dictated by the boot CLI. Both forms are supported: @Grab(module='bravo') @Grab('bravo') Groovy's global AST transformations, which is how Grab is implemented, do not support ordering and we need to augment the AST for the Grab annotation before its processed by the Grab AST transformation. To work around this, reflection is used to get hold of the compile operations in the conversion phase, and a new AST transformation is inserted immediately before the first AST transformation operation. To allow a module's groupId and version to be resolved consistently, META-INF/springcli.properties has been enhanced to include properties for each module that we want to support in the following form: <module>.groudId = <groudId> <module>.version = <version> <groupId> and <version> are taken from the Maven project's dependencies and VPP, a Velocity-based pre-processor, is used to automatically generate the enhanced properties file. To prevent pollution of spring-boot-cli's class path with the dependencies that are only required to populate springcli.properties, a separate project, spring-boot-cli-properties, has been created. spring-boot-cli depends upon this now project causing it to, via the shade plug, include the properties file in its jar. Previously DependencyCustomizer allow a dependency to be added by specifying its full coordinates, i.e. a group ID, artifact ID, and version. This commit updates DependencyCustomizer to only require an artifact/module ID. The group ID and version are then resolved using the same mechanism as the enhanced @Grab support. [#56328644] [bs-312] Allow @Grab without version
11 years ago
<module>spring-boot-cli-properties</module>
<module>spring-boot-integration-tests</module>
</modules>
</profile>
<profile>
<id>prepare</id>
<properties>
<skipTests>true</skipTests>
</properties>
<modules>
<module>spring-boot-tools</module>
</modules>
<build>
<plugins>
<plugin>
<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="\1ILESTONE" />
<propertyregex property="version-type" override="true"
input="${version-type}" regexp="BUILD-(.*)" replace="\1" />
<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-starter-parent</id>
<phase>verify</phase>
<goals>
<goal>run</goal>
</goals>
<inherited>false</inherited>
<configuration>
<target>
<property name="sourceFile"
value="spring-boot-starters/spring-boot-starter-parent/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:properties/m:spring-boot.version/text()">
<xsl:value-of select="/m:project/m:parent/m:version/text()"/>
</xsl:template>
<xsl:template
match="m:dependency[m:groupId='org.springframework.boot']/m:version/text()">
<xsl:text>${spring-boot.version}</xsl:text>
</xsl:template>
<xsl:template
match="m:plugin[m:groupId='org.springframework.boot']/m:version/text()">
<xsl:text>${spring-boot.version}</xsl: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>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>full</id>
</profile>
</profiles>
</project>