第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

SonarQube 不使用 IntelliJ 和 Maven 分析主要的 Java 代碼

SonarQube 不使用 IntelliJ 和 Maven 分析主要的 Java 代碼

大話西游666 2021-11-03 14:34:03
我在我的項(xiàng)目中使用 IntelliJ 和 Maven,我必須用 SonarQube 對(duì)其進(jìn)行分析,但是當(dāng)我使用 webApp 提供的命令掃描我的項(xiàng)目時(shí),它只分析 pom.xml 文件,而忽略了項(xiàng)目的其余部分。分析結(jié)果干凈安裝聲納:sonar -Dsonar.host.url= http://localhost:9000 -Dsonar.login="這里對(duì)應(yīng)的key"我的 pom.xml(項(xiàng)目標(biāo)簽里面是什么):<groupId>cl.itau.simulacionCredito</groupId><artifactId>SimulacionCreditoIntelliJ</artifactId><version>1.0</version><dependencies>    <dependency>        <groupId>org.testng</groupId>        <artifactId>testng</artifactId>        <version>RELEASE</version>        <scope>test</scope>    </dependency>    <!-- https://mvnrepository.com/artifact/com.beust/jcommander -->    <dependency>        <groupId>com.beust</groupId>        <artifactId>jcommander</artifactId>        <version>1.72</version>    </dependency></dependencies><properties>    <maven.compiler.source>6</maven.compiler.source>    <maven.compiler.target>1.6</maven.compiler.target></properties><build>    <plugins>        <plugin>            <groupId>org.apache.maven.plugins</groupId>            <artifactId>maven-surefire-plugin</artifactId>            <version>2.22.0</version>            <configuration>                <excludes>                    <exclude>**/HomeTest.java</exclude>                    <exclude>**/PropuestaTest.java</exclude>                </excludes>            </configuration>        </plugin>        <plugin>            <groupId>org.apache.maven.plugins</groupId>            <artifactId>maven-deploy-plugin</artifactId>            <version>3.0.0-M1</version>        </plugin>        <plugin>            <groupId>org.sonarsource.scanner.maven</groupId>            <artifactId>sonar-maven-plugin</artifactId>            <version>3.5.0.1254</version>        </plugin>    </plugins></build>由于在嘗試解決此問(wèn)題時(shí)出現(xiàn)不同的錯(cuò)誤,我一直在向 POM 添加內(nèi)容。我安裝了最新版本的 SonarQube。
查看完整描述

2 回答

?
慕雪6442864

TA貢獻(xiàn)1812條經(jīng)驗(yàn) 獲得超5個(gè)贊

Sonarqube 通過(guò)分析 jacoco 輸出來(lái)工作。我在你的 pom 中沒(méi)有看到 jacoco 的任何配置。 https://www.petrikainulainen.net/programming/maven/creating-code-coverage-reports-for-unit-and-integration-tests-with-the-jacoco-maven-plugin/是一個(gè)關(guān)于如何設(shè)置的好教程起來(lái)。

您還必須告訴 sonarqube 您的 jacoco.exec 文件所在的位置。 https://docs.sonarqube.org/display/PLUG/Code+Coverage+by+Unit+Tests+for+Java+Project


查看完整回答
反對(duì) 回復(fù) 2021-11-03
?
慕少森

TA貢獻(xiàn)2019條經(jīng)驗(yàn) 獲得超9個(gè)贊

所以,問(wèn)題是 IntelliJ 配置了 Java SE 開發(fā)工具包 11,我降級(jí)到 Java SE 開發(fā)工具包 8u181 并配置了 POM,以便 Maven 使用該更改,我再次執(zhí)行掃描器并且它工作了。


對(duì) pom.xml 的更改:


<properties>

    <maven.compiler.source>1.8</maven.compiler.source>

    <maven.compiler.target>1.8</maven.compiler.target>


    <sonar.sources>src/main/java</sonar.sources>

</properties>

添加:


<plugin>

   <groupId>org.apache.maven.plugins</groupId>

      <artifactId>maven-compiler-plugin</artifactId>

         <version>3.8.0</version>

         <configuration>

            <source>8</source>

            <target>8</target>

         </configuration>

</plugin>


查看完整回答
反對(duì) 回復(fù) 2021-11-03
  • 2 回答
  • 0 關(guān)注
  • 335 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)