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 插件.每个插件拥有一个或者多个目标,用户可以直接从命令行运行这些插件目 ...
随机推荐
- Servlet是什么?JSP和Servlet的区别。Servlet的生命周期。
Servlet(Server Applet),全称Java Servlet, 是用Java编写的服务器端程序.而这些Sevlet都要实现Servlet这个借口.其主要功能在于交互式地浏览和修改数据,生 ...
- Apply Grouping to List View Data 将分组应用于列表视图数据
This lesson will teach you how to apply grouping to List View data. For this purpose, you will group ...
- IDEA去除掉虚线,波浪线,和下划线实线的方法
初次安装使用IDEA,总是能看到导入代码后,出现很多的波浪线,下划线和虚线,这是IDEA给我们的一些提示和警告,但是有时候我们并不需要,反而会让人看着很不爽,这里简单记录一下自己的调整方法,供其他的小 ...
- Fiddler常用设置
1.设置抓取HTTPS请求 勾选后弹窗添加证书确认框 点击yes后,弹出警告 点击是,成功添加证书 点击OK确认,设置成功了 成功抓取到HTTPS请求 2.自定义会话框,展示GET和POST请求 3. ...
- docker可视化工具Portainer部署与汉化
为了更好的观察Docker运行状态,我们采用Portainer工具进行可视化,下面是部署过程总结: 环境: Liunx:CentOS Linux release 7.6.1810 (Core) Doc ...
- DSP程序中的布尔类型使用
在DSP程序中,布尔类型不能直接拿来用,要定义一下,可以通过定义为枚举类型来定义: typedef enum{FALSE=0,TRUE} BOOL; 一般枚举类型的定义是这样的:enum [枚举名] ...
- MySQL数据库:group分组
group by:分组 GroupBy语句从英文的字面意义上理解就是"根据(by)一定的规则进行分组(Group)".它的作用是通过一定的规则将一个数据集划分成若干个小的区域,然后 ...
- centos7设置服务开机自启
1.在/usr/lib/systemd/system/路径下创建文件 ***.service. 写入如下内容 [Unit]Description=nginxAfter=network.target [ ...
- 新手学Html之JSP简介——入门(一)
1.JSP:动态网页 静态动态:是否随着时间地点.用户操作的改变而改变 动态网页需要用到 服务端脚本语言(JSP) 2.架构 CS:Client Server 不足: a.如果软件升级.那么全部软件都 ...
- C++ std::vector 基本用法2
#include <iostream> #include <vector> using namespace std; int main() { int ar[10] = { 1 ...