From cfcbbcadb3d96938b9a5eb22afacab42cc21e212 Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Sun, 12 Apr 2015 13:48:57 +0800 Subject: [PATCH] Update 73.2. Create an executable JAR with Maven.md --- .../73.2. Create an executable JAR with Maven.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/IX. ‘How-to’ guides/73.2. Create an executable JAR with Maven.md b/IX. ‘How-to’ guides/73.2. Create an executable JAR with Maven.md index e69de29..cdf3045 100644 --- a/IX. ‘How-to’ guides/73.2. Create an executable JAR with Maven.md +++ b/IX. ‘How-to’ guides/73.2. Create an executable JAR with Maven.md @@ -0,0 +1,33 @@ +### 73.2. 使用Maven创建可执行JAR + +`spring-boot-maven-plugin`能够用来创建可执行的'胖'JAR。如果你正在使用`spring-boot-starter-parent` POM,你可以简单地声明该插件,然后你的jar将被重新打包: +```xml + + + + org.springframework.boot + spring-boot-maven-plugin + + + +``` +如果没有使用parent POM,你仍旧可以使用该插件。不过,你需要另外添加一个``片段: +```xml + + + + org.springframework.boot + spring-boot-maven-plugin + 1.3.0.BUILD-SNAPSHOT + + + + repackage + + + + + + +``` +查看[插件文档](http://docs.spring.io/spring-boot/docs/1.3.0.BUILD-SNAPSHOT/maven-plugin/usage.html)获取详细的用例。