Eclipse实用插件

Eclipse实用插件

安装: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;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

 

#

相关文章
相关标签/搜索