maven clean插件使用进阶
maven clean插件使用进阶
参考
查看命令帮助
mvn clean:help
mvn clean:help -Ddetail=true -Dgoal=clean
跳过clean和删除指定的文件夹
<properties>
<!--
方式一:跳过clean
3.0.0以前的版本属性是clean.skip,之后的属性是maven.clean.skip
-->
<!--<maven.clean.skip>true</maven.clean.skip>-->
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<!-- 方式二:跳过clean -->
<skip>true</skip>
<filesets>
<!-- 删除文件夹generated -->
<fileset>
<directory>src/main/generated</directory>
</fileset>
<!-- 删除mozq文件夹中符合条件的,但是不会删除mozq文件夹 -->
<fileset>
<directory>src/main/mozq</directory>
<includes>
<include>*.txt</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ demo-01 ---
[INFO] Deleting D:\00\mozq_pro1\shiro\demo-01\src\main\generated (includes = [], excludes = [])
[INFO] Deleting D:\00\mozq_pro1\shiro\demo-01\src\main\mozq (includes = [*.txt], excludes = [])
[INFO] ------------------------------------------------------------------------
帮助
Maven Clean Plugin
The Maven Clean Plugin is a plugin that removes files generated at build-time
in a project's directory.
clean:clean
Goal which cleans the build.
This attempts to clean a project's working directory of the files that were
generated at build-time. By default, it discovers and deletes the directories
configured in project.build.directory, project.build.outputDirectory,
project.build.testOutputDirectory, and project.reporting.outputDirectory.
Files outside the default may also be included in the deletion by configuring
the filesets tag.
Available parameters:
excludeDefaultDirectories (Default: false)
Disables the deletion of the default output directories configured for a
project. If set to true, only the files/directories selected via the
parameter filesets will be deleted.
Expression: ${clean.excludeDefaultDirectories}
failOnError (Default: true)
Indicates whether the build will continue even if there are clean errors.
Expression: ${maven.clean.failOnError}
filesets
The list of file sets to delete, in addition to the default directories.
For example:
<filesets>
<fileset>
<directory>src/main/generated</directory>
<followSymlinks>false</followSymlinks>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>*.java</include>
</includes>
<excludes>
<exclude>Template*</exclude>
</excludes>
</fileset>
</filesets>
followSymLinks (Default: false)
Sets whether the plugin should follow symbolic links while deleting files
from the default output directories of the project. Not following symlinks
requires more IO operations and heap memory, regardless whether symlinks
are actually present. So projects with a huge output directory that
knowingly does not contain symlinks can improve performance by setting
this parameter to true.
Expression: ${clean.followSymLinks}
retryOnError (Default: true)
Indicates whether the plugin should undertake additional attempts (after a
short delay) to delete a file if the first attempt failed. This is meant
to help deleting files that are temporarily locked by third-party tools
like virus scanners or search indexing.
Expression: ${maven.clean.retryOnError}
skip (Default: false)
Disables the plugin execution.
Expression: ${clean.skip}
verbose
Sets whether the plugin runs in verbose mode. As of plugin version 2.3,
the default value is derived from Maven's global debug flag (compare
command line switch -X).
Expression: ${clean.verbose}
maven clean插件使用进阶的更多相关文章
- 学习Maven之Maven Clean Plugin
1.maven-clean-plugin是个什么鬼? maven-clean-plugin这个插件用maven的人都不陌生.我们在执行命令mvn clean时调用的就是这个插件. 这个插件的主要作用就 ...
- Maven 的插件和生命周期的绑定
一.Maven 的生命周期 Maven 的生命周期是对所有的构建过程进行抽象和统一.Maven 的生命周期是抽象的,这意味着生命周期本身不做任何实际的工作,生命周期只是定义了一系列的阶段,并确定这些阶 ...
- [maven] 常用插件解析
参考资料:http://my.oschina.net/zh119893/blog/276090 我们都知道Maven本质上是一个插件框架,它的核心并不执行任何具体的构建任务,所有这些任务都交给插件来完 ...
- maven+mybatis-generator插件反向生成源代码
通过maven+mybatis-generator插件反向生成源代码,如有一个table表为resource,那么将自动生成这样三个文件:Resource.java类.ResourceMapper.j ...
- maven常用插件配置详解
常用插件配置详解Java代码 <!-- 全局属性配置 --> <properties> <project.build.name>tools</proje ...
- Maven常用插件简单配置
好久不见,甚是想念.一日不见,如隔三秋. 从春节到现在已经很久没有回归博客园了,今天回来温习一下maven常用的一些插件的配置,学东西一个很简单的诀窍就是重复重复再重复,这样一定能把知识掌握的很牢靠. ...
- Maven 默认插件以及功能
Maven 默认插件 已知 Maven 使用 plugin 来执行实际操作的,在默认情况下,Maven 会绑定以下几个插件来完成基本操作. plugin function life cycle pha ...
- eclipse maven build、maven clean、maven install和maven test的区别 精析
1.情景展示 选中maven项目,右键-->Run As或Debug As-->maven buid,maven install,maven test有什么区别? 2.区别说明 ...
- 13 Maven 编写插件
Maven 编写插件 Maven 的任何行为都是由插件完成的,包括项目的清理.绵编译.测试以及打包等操作都有其对应的 Maven 插件.每个插件拥有一个或者多个目标,用户可以直接从命令行运行这些插件目 ...
随机推荐
- PlayJava Day028
1.网络程序中套接字(Socket)用于将应用程序与端口连接起来 套接字是一个假想的连接装置,就像插插头的设备”插座“,用于连接电器与电线,如下所示 客户端:应用程序 <----> Soc ...
- JDK性能分析与故障处理-命令行
一.命令演示登录主机:21docker ps -a | grep 'hub.ecs.com:6999/open_pro.*open-pro-apple2'docker exec -it ID /bin ...
- SSM(SpringMVC+Spring+MyBatis)三大框架使用Maven快速搭建整合(实现数据库数据到页面进行展示)
本文介绍使用SpringMVC+Spring+MyBatis三大框架使用Maven快速搭建一个demo,实现数据从数据库中查询返回到页面进行展示的过程. 技术选型:SpringMVC+Spring+M ...
- python科学计算和数据分析常用库
NumPy NumPy最强大的是n维数组,该库还包含基本的线性代数函数.傅立叶变换.随机函数和其他底层语言(如Fortran.C和C++)集成的工具. SciPy SciPy建立在NumPy基础上,它 ...
- Samba安装及配置
samba 可以实现Windows对Windows . Windows对Linux.Linux对Linux的文件传输 在centos7安装samba yum install samba 启动samba ...
- java 后台上传文件
java 后台上传文件 public static String uploadFile(File file, String RequestURL) throws IOException { Strin ...
- Ubuntu18.04 设置开机进入命令行模式
首先来了解下启动级别(Runlevel): 指 Unix 或 类 Unix 操作系统下不同的运行模式,运行级别通常分为 7 级: 运行级别 0:系统停机状态,系统默认运行级别不能设为0,否则不能正常启 ...
- C# MD5 32大写位加密 UTF-8编码
string UserMd5(string str) { string cl = str; string pwd = ""; MD5 md5 = MD5.Create();//实例 ...
- eclipse的一些常用快捷键
掌握了eclipse快捷键功能,能够大大提高开发效率. 这里总结一些eclipse的常用快捷键. 编辑相关快捷键 1. [ALT+/]:此快捷键为用户编辑的好帮手,能为用户提供内容的辅助,不要为记不 ...
- Linux之自动化部署
No.1 自动化部署git项目 一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一 ...