【maven】之开发pom配置常用插件
2024-10-13 06:29:24
1、打包跳过测试代码
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
2、打包项目源码
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.1</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
package范围打包
3、整合jetty插件
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.8.v20150217</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<httpConnector>
<port>8888</port>
</httpConnector>
<webApp>
<contextPath>/sms</contextPath>
</webApp>
<war>${project.build.directory}/luna.war</war>
</configuration>
</plugin>
port:启动端口,contextPath:启动应用名称,scanIntervalSeconds:每隔10s钟扫描一次,war:打包项目
4、整合tomcat7插件
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8888</port>
<path>/luna</path>
<uriEncoding>UTF-8</uriEncoding>
<server>tomcat7</server>
</configuration>
</plugin>
最新文章
- [示例] Firemonkey 不规则按钮实做
- jpa 表字段转bean对象
- fatal error LNK1112: module machine type &#39;x64&#39; conflicts with target machine type &#39;X86&#39;
- uva 129
- REST 测试工具
- c++动态库与静态库
- IT行业能力细分
- SELECT中的if_case流程函数
- 网页端HTML使用MQTTJs订阅RabbitMQ数据
- Android源代码下载 “Gerrit下载源代码”
- docker学习-lnmp+redis之搭建redis容器服务
- Java的优先级任务队列的实践
- day14(1)--递归、匿名函数、内置函数
- 图片居中table-cell
- 第一个Python小爬虫
- MySQL 基础十 性能优化
- Architecture options to run a workflow engine
- Mongodb主从复制 及 副本集+分片集群梳理
- float right
- 向Nexus仓库推送/使用各种组件
热门文章
- 160. Intersection of Two Linked Lists
- bzoj 1012 维护一个单调数列
- html5中新的标准属性
- AttributeError: &#39;NoneType&#39; object has no attribute &#39;bytes&#39; python3.4 win64
- AXIOM解析XML 详细原理
- HDU-5536 Chip Factory (字典树)
- MySQL中日期与字符串相互转换,并进行日期比较查询
- Ubuntu 安装和配置redis数据库
- 二十四种设计模式:提供者模式(Provider Pattern)
- JSP 相关试题(二)