Maven 打包时排除不想打包的文件&跳过测试
来源:互联网 发布:java listview的add 编辑:程序博客网 时间:2024/05/02 14:49
Maven 打包时排除不想打包的文件&跳过测试
打包时不将资源文件夹下的文件打入包中
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项目打包发布时跳过测试
- PWM 介绍
- LoadRunner学习笔记
- swfupload Error #2038解决办法
- SEO优化三拇指标要害字的价格
- 努力的感悟!
- Maven 打包时排除不想打包的文件&跳过测试
- Failed to open design unit file "%XILINX%/verilog/src/glbl.v
- Apache模块开发/用C语言扩展apache(4:一个生产环境使用的apache module)
- VMware中安装CentOS
- PL/SQL的作用
- SEO进行图片优化的步骤和技巧
- DateTime简单使用
- Fajata use
- 《算法竞赛-训练指南》1.14-UVa 11520