Starter pom gets spring.zero.version as a property

We are using a resource filter to generate that pom, so it will change
when the version changes.  I prefer on balance leaving the generated
code in git in a place where it will be useful in a clean clone.

[Fixes #53189241] [bs-227]
pull/9/head
Dave Syer 12 years ago
parent 6fd6afc7a3
commit c055cf063d

@ -25,4 +25,34 @@
<module>spring-starter-tomcat</module>
<module>spring-starter-web</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<inherited>false</inherited>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>#{*}</delimiter>
</delimiters>
<resources>
<resource>
<directory>src/main/parent</directory>
<filtering>true</filtering>
</resource>
</resources>
<outputDirectory>${basedir}/spring-starter-parent</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -2,7 +2,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>
<!-- NOTE: Intentionally does not inherit from root parent -->
<!-- NOTE: Intentionally does not inherit from root parent. Autogenerated,
from ../src/main/parent do not edit. -->
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-parent</artifactId>
<version>0.5.0.BUILD-SNAPSHOT</version>
@ -101,11 +102,14 @@
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>spring-deploy</id>
<distributionManagement>
<downloadUrl>http://www.springsource.com/download/community</downloadUrl>
<site>
<id>spring-docs</id>
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-bootstrap/docs/${project.version}</url>
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-zero/docs/${project.version}</url>
</site>
<repository>
<id>spring-repo-release</id>
@ -118,6 +122,8 @@
<url>http://repo.springsource.org/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
<build>
<resources>
<resource>

@ -0,0 +1,346 @@
<?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>
<!-- NOTE: Intentionally does not inherit from root parent. Autogenerated,
do not edit. -->
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-parent</artifactId>
<version>0.5.0.BUILD-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<java.version>1.6</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring.version>4.0.0.BUILD-SNAPSHOT</spring.version>
<spring.zero.version>#{project.version}</spring.zero.version>
</properties>
<prerequisites>
<maven>3.0</maven>
</prerequisites>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-zero</artifactId>
<version>${spring.zero.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-bootstrap</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-actuator</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-actuator</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-web</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-tomcat</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-jetty</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-data-jpa</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-batch</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-integration</artifactId>
<version>${spring.zero.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-security</artifactId>
<version>${spring.zero.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Generally useful test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>spring-deploy</id>
<distributionManagement>
<downloadUrl>http://www.springsource.com/download/community</downloadUrl>
<site>
<id>spring-docs</id>
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-zero/docs/${project.version}</url>
</site>
<repository>
<id>spring-repo-release</id>
<name>Spring Release Repository</name>
<url>http://repo.springsource.org/libs-release-local</url>
</repository>
<snapshotRepository>
<id>spring-repo-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>http://repo.springsource.org/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/application.yml</include>
<include>**/application.propeties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**/application.yml</exclude>
<exclude>**/application.propeties</exclude>
</excludes>
</resource>
</resources>
<pluginManagement>
<plugins>
<!-- Use specific maven plugin versions -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.13</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.8</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.2</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.2</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version>
<configuration>
<includes>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
</plugin>
<!-- Support the generally useful versions command -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.0</version>
</plugin>
<!-- Support the generally useful git info plugin -->
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>1.9</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>src/main/resources/git.properties</generateGitPropertiesFilename>
</configuration>
</plugin>
<!-- Support our own packaging plugin -->
<plugin>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-package-maven-plugin</artifactId>
<version>${spring.zero.version}</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Support shade packaging -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<dependencies>
<dependency>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-package-maven-plugin</artifactId>
<version>${spring.zero.version}</version>
</dependency>
</dependencies>
<configuration>
<keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
<createDependencyReducedPom>true</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer
implementation="org.springframework.maven.packaging.PropertiesMergingResourceTransformer">
<resource>META-INF/spring.factories</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${start-class}</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Loading…
Cancel
Save