Rework maven parent starter POM

Create a new spring-starter-maven-parent POM that does not inherit from
the main parent.

Issue: #53185049
pull/7/head
Phillip Webb 12 years ago
parent d8d8b7643b
commit 29a9f69d96

@ -11,9 +11,6 @@
<packaging>pom</packaging>
<properties>
<main.basedir>${basedir}/..</main.basedir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring.zero.version>0.5.0.BUILD-SNAPSHOT</spring.zero.version>
</properties>
<modules>
<module>spring-starter</module>
@ -21,171 +18,8 @@
<module>spring-starter-batch</module>
<module>spring-starter-integration</module>
<module>spring-starter-data-jpa</module>
<module>spring-starter-maven-parent</module>
<module>spring-starter-security</module>
<module>spring-starter-web</module>
</modules>
<dependencyManagement>
<dependencies>
<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-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>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<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>
<build>
<plugins>
<!-- Support zero types -->
<plugin>
<groupId>org.springframework.zero</groupId>
<artifactId>spring-package-maven-plugin</artifactId>
<version>${spring.zero.version}</version>
<extensions>true</extensions>
<inherited>true</inherited>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- Allow exec plugin to launch the application -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<includePluginDependencies>true</includePluginDependencies>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
<!-- Support shade packaging -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<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>

@ -22,6 +22,10 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>

@ -18,6 +18,22 @@
<artifactId>spring-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>

@ -0,0 +1,347 @@
<?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 -->
<groupId>org.springframework.zero</groupId>
<artifactId>spring-starter-maven-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>0.5.0.BUILD-SNAPSHOT</spring.zero.version>
</properties>
<prerequisites>
<maven>3.0</maven>
</prerequisites>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-instrument</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
<version>${spring.version}</version>
</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-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>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.5</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</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>
<build>
<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>maven-surefire-plugin</artifactId>
<version>2.15</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
</plugin>
<!-- Allow exec plugin to launch the application -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<includePluginDependencies>true</includePluginDependencies>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
<!-- Support the generally useful versions command -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.0</version>
</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>

@ -23,10 +23,6 @@
<artifactId>spring-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>

Loading…
Cancel
Save