Migrate to bootstrap maven plugin

Migrate certain samples to make use of the new bootstrap maven plugin

Issue: #52091115
This commit is contained in:
Phillip Webb 2013-06-20 14:14:52 -07:00
parent 19b392bb3d
commit 665d07ad74
9 changed files with 43 additions and 93 deletions

View File

@ -28,6 +28,18 @@
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<includePluginDependencies>true</includePluginDependencies>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
<!-- Launcher Style -->
<plugin>
<!-- Copy dependencies before assembly -->
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<executions> <executions>
<execution> <execution>
@ -64,6 +76,7 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<!-- Assemble a complete JAR -->
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<configuration> <configuration>
<descriptors> <descriptors>
@ -89,14 +102,8 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId> <!-- Shade Style -->
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<includePluginDependencies>true</includePluginDependencies>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
@ -154,6 +161,14 @@
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>
<plugin>
<!-- Support executable archives -->
<groupId>${project.groupId}</groupId>
<artifactId>spring-bootstrap-maven-plugin</artifactId>
<version>${project.version}</version>
<extensions>true</extensions>
<inherited>true</inherited>
</plugin>
<plugin> <plugin>
<!--skip deploy (these are just samples) --> <!--skip deploy (these are just samples) -->
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-deploy-plugin</artifactId>

View File

@ -8,10 +8,7 @@
<version>0.5.0.BUILD-SNAPSHOT</version> <version>0.5.0.BUILD-SNAPSHOT</version>
</parent> </parent>
<artifactId>spring-bootstrap-batch-sample</artifactId> <artifactId>spring-bootstrap-batch-sample</artifactId>
<packaging>jar</packaging> <packaging>executable-jar</packaging>
<properties>
<start-class>org.springframework.bootstrap.sample.simple.SimpleBootstrapApplication</start-class>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
@ -36,14 +33,4 @@
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -8,10 +8,7 @@
<version>0.5.0.BUILD-SNAPSHOT</version> <version>0.5.0.BUILD-SNAPSHOT</version>
</parent> </parent>
<artifactId>spring-bootstrap-data-sample</artifactId> <artifactId>spring-bootstrap-data-sample</artifactId>
<packaging>jar</packaging> <packaging>executable-jar</packaging>
<properties>
<start-class>org.springframework.bootstrap.sample.data.DataBootstrapApplication</start-class>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
@ -69,14 +66,4 @@
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -8,10 +8,7 @@
<version>0.5.0.BUILD-SNAPSHOT</version> <version>0.5.0.BUILD-SNAPSHOT</version>
</parent> </parent>
<artifactId>spring-bootstrap-jetty-sample</artifactId> <artifactId>spring-bootstrap-jetty-sample</artifactId>
<packaging>jar</packaging> <packaging>executable-jar</packaging>
<properties>
<start-class>org.springframework.bootstrap.sample.jetty.JettyBootstrapApplication</start-class>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
@ -43,14 +40,4 @@
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -8,10 +8,7 @@
<version>0.5.0.BUILD-SNAPSHOT</version> <version>0.5.0.BUILD-SNAPSHOT</version>
</parent> </parent>
<artifactId>spring-bootstrap-profile-sample</artifactId> <artifactId>spring-bootstrap-profile-sample</artifactId>
<packaging>jar</packaging> <packaging>executable-jar</packaging>
<properties>
<start-class>org.springframework.bootstrap.sample.simple.SimpleBootstrapApplication</start-class>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
@ -29,14 +26,4 @@
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -8,10 +8,7 @@
<version>0.5.0.BUILD-SNAPSHOT</version> <version>0.5.0.BUILD-SNAPSHOT</version>
</parent> </parent>
<artifactId>spring-bootstrap-simple-sample</artifactId> <artifactId>spring-bootstrap-simple-sample</artifactId>
<packaging>jar</packaging> <packaging>executable-jar</packaging>
<properties>
<start-class>org.springframework.bootstrap.sample.simple.SimpleBootstrapApplication</start-class>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
@ -24,14 +21,4 @@
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -8,10 +8,7 @@
<version>0.5.0.BUILD-SNAPSHOT</version> <version>0.5.0.BUILD-SNAPSHOT</version>
</parent> </parent>
<artifactId>spring-bootstrap-tomcat-sample</artifactId> <artifactId>spring-bootstrap-tomcat-sample</artifactId>
<packaging>jar</packaging> <packaging>executable-jar</packaging>
<properties>
<start-class>org.springframework.bootstrap.sample.tomcat.TomcatBootstrapApplication</start-class>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>
@ -36,14 +33,4 @@
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -8,7 +8,7 @@
<version>0.5.0.BUILD-SNAPSHOT</version> <version>0.5.0.BUILD-SNAPSHOT</version>
</parent> </parent>
<artifactId>spring-bootstrap-xml-sample</artifactId> <artifactId>spring-bootstrap-xml-sample</artifactId>
<packaging>jar</packaging> <packaging>executable-jar</packaging>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${project.groupId}</groupId> <groupId>${project.groupId}</groupId>

View File

@ -108,8 +108,19 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins>
<!-- Support bootstrap types -->
<plugin>
<groupId>org.springframework.bootstrap</groupId>
<artifactId>spring-bootstrap-maven-plugin</artifactId>
<version>${spring.bootstrap.version}</version>
<extensions>true</extensions>
<inherited>true</inherited>
</plugin>
</plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<!-- Allow exec plugin to launch the application -->
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
@ -118,6 +129,8 @@
<mainClass>${start-class}</mainClass> <mainClass>${start-class}</mainClass>
</configuration> </configuration>
</plugin> </plugin>
<!-- Support shade packaging -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>