作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试为 maven 项目模块之一禁用 maven-pmd-plugin 的执行,但找不到有效的解决方案。
现在我在模块中有下一个:
<properties>
<cpd.skip>true</cpd.skip>
<pmd.skip>true</pmd.skip>
<maven.pmd.enable>false</maven.pmd.enable>
<maven.pmd.cpd.enable>false</maven.pmd.cpd.enable>
</properties>
[INFO] --- maven-pmd-plugin:3.2:cpd (pmd-cpd) @ module ---
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-pmd-plugin:3.2:cpd from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-pmd-plugin:3.2, parent: sun.misc.Launcher$AppClassLoader@6e70c242]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-pmd-plugin:3.2:cpd' with basic configurator -->
[DEBUG] (f) aggregate = false
[DEBUG] (f) compileSourceRoots = [/cicd/module/src/main/java]
[DEBUG] (f) format = xml
[DEBUG] (f) ignoreIdentifiers = false
[DEBUG] (f) ignoreLiterals = false
[DEBUG] (f) includeTests = false
[DEBUG] (f) includeXmlInSite = false
[DEBUG] (f) linkXRef = true
[DEBUG] (f) minimumTokens = 100
[DEBUG] (f) outputDirectory = /cicd/module/target/site
[DEBUG] (f) skip = true
[DEBUG] (f) skipEmptyReport = true
[DEBUG] (f) targetDirectory = /cicd/module/target
[DEBUG] (f) testSourceRoots = [/cicd/module/src/test/java]
[DEBUG] (f) xrefLocation = /cicd/module/target/site/xref
[DEBUG] (f) xrefTestLocation = /cicd/module/target/site/xref-test
[DEBUG] -- end configuration --
[DEBUG] Exclusions: **/*~,**/#*#,**/.#*,**/%*%,**/._*,**/CVS,**/CVS/**,**/.cvsignore,**/RCS,**/RCS/**,**/SCCS,**/SCCS/**,**/vssver.scc,**/project.pj,**/.svn,**/.svn/**,**/.arch-ids,**/.arch-ids/**,**/.bzr,**/.bzr/**,**/.MySCMServerInfo,**/.DS_Store,**/.metadata,**/.metadata/**,**/.hg,**/.hg/**,**/.git,**/.gitignore,**/.gitattributes,**/.git/**,**/BitKeeper,**/BitKeeper/**,**/ChangeSet,**/ChangeSet/**,**/_darcs,**/_darcs/**,**/.darcsrepo,**/.darcsrepo/**,**/-darcs-backup*,**/.darcs-temp-mail
[DEBUG] Inclusions: **/*.java
[DEBUG] Searching for files in directory /cicd/module/src/main/java
[WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
[DEBUG] Executing CPD...
最佳答案
如果你想禁用一个 Maven 模块,你已经在那个模块中配置了 pmd。然后全部排除。
像这样:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<analysisCache>true</analysisCache>
<!-- enable incremental analysis -->
<excludes>
<exclude>**/**</exclude>
</excludes>
</configuration>
</plugin>
关于maven-pmd-plugin 禁用一个模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26546617/
我是一名优秀的程序员,十分优秀!