Maven 打包时排除不想打包的文件&跳过测试
来源:互联网 发布:注意力缺失症 知乎 编辑:程序博客网 时间:2024/04/30 08:59
转自http://scorpio-jh.i.sohu.com/blog/view/151349557.htm
存着备忘
打包时不将资源文件夹下的文件打入包中
pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<warSourceExcludes>src/main/resources/**</warSourceExcludes>
</configuration>
</plugin>
</plugins>
</build>
跳过测试
1. pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
2. 命令
mvn test -Dmaven.test.failure.ignore=true
mvn install -Dmaven.test.skip=true
按不同的配置参数打包:
mvn clean package -PtestServer
mvn clean package -Pdevelop
pom.xml
<profiles>
<profile>
<id>develop</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- local -->
<com.xxx.xxx.log.dir>D:\apache-tomcat-6.0.18\logs\</com.xxx.xxx.log.dir>
<com.xxx.xxx.upload.temp.dir>C:/temp</com.xxx.xxx.upload.temp.dir>
<com.xxx.xxx.node.image.root.url>http://127.0.0.1:8080/xxx_war/images/node/banner/</com.xxx.xxx.node.image.root.url>
<com.xxx.xxx.upload.node.image.savePath>D:/xxx/upload/images/node/banner/</com.xxx.xxx.upload.node.image.savePath>
</properties>
</profile>
<profile>
<id>testServer</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<!-- test server -->
<com.xxx.xxx.log.dir>/home/xxx/logs/</com.xxx.xxx.log.dir>
<com.xxx.xxx.upload.temp.dir>/home/xxx/upload/temp</com.unionread.publish.upload.temp.dir>
<com.xxx.xxx.node.image.root.url>http://192.168.1.1:8091/xxx_war/images/node/banner/</com.xxx.xxx.node.image.root.url>
<com.xxx.xxx.upload.node.image.savePath>/home/xxx/upload/images/node/banner/</com.xxx.xxx.upload.node.image.savePath>
</properties>
</profile>
</profiles>
- Maven 打包时排除不想打包的文件&跳过测试
- Maven 打包时排除不想打包的文件&跳过测试
- Maven 打包时排除不想打包的文件&跳过测试
- maven打包时跳过测试
- maven打包时跳过测试
- maven打包时跳过测试
- maven打包时跳过测试
- maven打包时跳过测试
- maven打包时跳过测试
- maven打包时跳过测试
- maven打包时跳过测试
- maven打包时跳过测试
- maven打包跳过测试
- maven打包跳过测试
- 全网都找不到的maven-jar-plugin怎么排除不想打包的目录文件内容
- maven 打包的时候跳过测试
- maven 打包跳过测试的方法
- maven项目打包发布时跳过测试
- 搭建sip环境
- event.currentTarget与event.target的不同
- 什么是清洁发展机制(CDM)项目
- ubuntu中的服务配置工具
- System.map 文件的作用
- Maven 打包时排除不想打包的文件&跳过测试
- 微软面试100题及答案
- oracle 10g中ASM概念以及管理
- apache 虚拟主机方式中一种
- linux下IPCS指令的用法详解
- 用MFC实现WebGUI--(CDHtmlDialog)
- 设计模式之——命令(Command)模式
- Linux中的spinlock和mutex
- C++ 内存 分配 示例