Hunter的大杂烩 技术学习笔记

2021-09-09

maven git插件临时屏蔽的方法

Filed under: 技术话题 — hunter @ 4:08 pm

有时从parent处继承的配置中,包括 git-commit-id-plugin ,但实际上不需要或临时想停止用git检查需要编译的代码,可以在项目pom.xml中增加 <skip>true</skip>配置,比如

<build>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.4</version>
<configuration>
<!–“.git”文件夹未找到时,构建是否失败;若设置true,则构建失败;若设置false,则跳过执行该目标;默认值:true;–>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress