gpt4 book ai didi

sonarqube - 如何在多模块java项目中的 Sonar 分析中跳过子模块

转载 作者:行者123 更新时间:2023-12-02 07:59:57 67 4
gpt4 key购买 nike

我有一个多模块 Maven 项目。我需要从 Sonar 分析中排除其中一个子模块。

我从父目录运行 mvn sonar:sonar。

有没有办法在 pom 文件中指定排除项,或者我们是否需要在 Sonar qube 中配置它。

最佳答案

来自documentation :

You can either:

  • define property <sonar.skip>true</sonar.skip> in the pom.xml of the module you want to exclude
  • use build profiles to exclude some module (like for integration tests)
  • use Advanced Reactor Options (such as "-pl"). For example } mvn sonar:sonar -pl !module2

关于sonarqube - 如何在多模块java项目中的 Sonar 分析中跳过子模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30178581/

67 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com