【问题标题】:SonarQube and mavenSonarQube 和 Maven
【发布时间】:2018-04-17 15:31:46
【问题描述】:

当我构建我的项目时,我通常会调用mvn clean install

现在我尝试集成声纳分析。因此,我在 Eclipse 中创建了一个新的运行配置,并在其中使用一些参数执行目标 mvn sonar:sonar

有没有办法在mvn clean install 中自动运行sonar:sonar

【问题讨论】:

  • 您可以在 pom 中配置插件并将其添加到阶段。
  • 在同一个生命周期内运行确实有问题,mvn clean install sonar:sonar 适合你吗?

标签: maven sonarqube


【解决方案1】:

这应该记录在“Analyzing with SonarQube Scanner for Maven”中。
它将在构建阶段触发。

<build>
  <pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.sonarsource.scanner.maven</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
        <version>3.3.0.603</version>
      </plugin>
    </plugins>
  </pluginManagement>
</build>

然后查看“Running sonar analysis with mvn sonar:sonar ignores sonar-project.properties”。
将其与 existing lifecycle phase seems problematic 关联。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-26
    • 2018-03-16
    • 2020-12-29
    • 2016-07-26
    • 2016-01-09
    • 1970-01-01
    • 2021-02-09
    • 1970-01-01
    相关资源
    最近更新 更多