安裝:Help - Eclipse Marketplacejava
查看圖片:QuickImagemysql
主題:Darkest Darksql
代碼風格:https://blog.csdn.net/qq_36871364/article/details/72472059maven
BUG檢查:spotbugs單元測試
單元測試:TestNG測試
代碼分析:SonarLintui
https://www.sonarqube.org/downloads/url
啓動方法:運行bin目錄,StartSonar.batspa
重啓方法:結束全部java進程,執行StartSonar.bat.net
查看網頁:localhost:9000
配置MySql連接,而後重啓
conf->sonar.properties
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false sonar.jdbc.username=root sonar.jdbc.password=1111aaaa sonar.sourceEncoding=UTF-8
默認登陸密碼:admin/admin
安裝完成後就能夠生成maven項目報告了
須要在maven->settings.xml下面添加
<profile> <id>sonar</id> <properties> <sonar.jdbc.url> jdbc:mysql://localhost:3306/sonar?useUnicode=true&amp;characterEncoding=utf8 </sonar.jdbc.url> <sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver> <sonar.jdbc.username>root</sonar.jdbc.username> <sonar.jdbc.password>1111aaaa</sonar.jdbc.password> <sonar.host.url>http://localhost:9000</sonar.host.url> </properties> </profile> <activeProfiles> <activeProfile>sonar</activeProfile> </activeProfiles>
運行mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=b630bcf5d647bfcc9077c2da9eb898da8e9d2921
運行Debug,Goals輸出:sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=b630bcf5d647bfcc9077c2da9eb898da8e9d2921
打包war:clean package
普通運行:clean install
運行:clean compile package
#