看見網上有好幾種打包的方式,可是我目前只使用了下面這種方式。apache
修改pom.xml文件,添加插件maven
<!-- 打包 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass>com.mohoo.WxfpApplication</mainClass> </manifest> </archive> </configuration> </plugin>
2. 執行mvn clean package 命令spa
參考資料.net
http://blog.csdn.net/johnnywww/article/details/7964326插件