国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

如何構建一個可執行的 war

2019-11-08 03:14:35
字體:
來源:轉載
供稿:網友
介紹一下"項目獨立運行與發布",這里提供兩種方案

runnable war

add below to ++pom.xml++<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>tomcat-run</id> <goals> <goal>exec-war-only</goal> </goals> <phase>package</phase> <configuration> <path>/</path> <!-- optional only if you want to use a PReconfigured server.xml file --> <!-- <serverXml>src/main/tomcatconf/server.xml</serverXml> --> <!-- optional values which can be configurable --> <attachArtifactClassifier>default value is exec-war but you can customize</attachArtifactClassifier> <attachArtifactClassifierType>default value is jar</attachArtifactClassifierType> </configuration> </execution> </executions></plugin>run the following command:mvn clean package -Prunnable-war

使用maven插件對java工程進行打包

package jar with dependencies<plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <appendAssemblyId>false</appendAssemblyId> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>com.chenzhou.examples.Main</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>assembly</goal> </goals> </execution> </executions></plugin>run the following command:mvn assembly:assembly -Dmaven.test.skip=true

referrence

executable war jarHow to Build an Executable War or Jar Files使用maven插件對java工程進行打包
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 汉沽区| 甘南县| 永兴县| 镇远县| 黄浦区| 济南市| 海口市| 民和| 象州县| 武威市| 洪江市| 乌拉特中旗| 汉阴县| 镇康县| 平罗县| 房产| 桐梓县| 黑水县| 抚远县| 灵寿县| 哈尔滨市| 万年县| 田阳县| 安徽省| 新兴县| 四子王旗| 全州县| 贵定县| 云浮市| 莱西市| 二连浩特市| 漳平市| 岳阳县| 开原市| 台江县| 卢龙县| 鄂托克前旗| 元谋县| 元谋县| 资中县| 沙洋县|