@ -42,8 +42,8 @@ public class SonarService {
@Value ( "${sonar.url}" )
String sonarUrl ;
@Value ( "${sonar.token}" )
String sonarToken ;
// @Value("${sonar.token}")
// String sonarToken;
@Value ( "${extract.path}" )
String extractProgramPath ;
@ -60,7 +60,6 @@ public class SonarService {
"-Dsonar.host.url=" + sonarUrl + " " +
"-Dsonar.sourceEncoding=utf-8 " +
"-Dsonar.projectKey=" + param . getProjectKey ( ) + " " +
"-Dsonar.login=" + sonarToken + " " +
"-Dsonar.java.binaries=./ " +
"-Dsonar.projectBaseDir=" + param . getProjectPath ( ) ;
@ -71,7 +70,6 @@ public class SonarService {
"-Dsonar.host.url=" + sonarUrl + " " +
"-Dsonar.sourceEncoding=utf-8 " +
"-Dsonar.projectKey=" + param . getProjectKey ( ) + " " +
"-Dsonar.login=" + sonarToken + " " +
"-Dsonar.projectBaseDir=" + param . getProjectPath ( ) ;
SystemUtil . executeAndGetExitStatus ( command ) ;
@ -82,7 +80,6 @@ public class SonarService {
"-Dsonar.host.url=" + sonarUrl + " " +
"-Dsonar.sourceEncoding=utf-8 " +
"-Dsonar.projectKey=" + param . getProjectKey ( ) + " " +
"-Dsonar.login=" + sonarToken + " " +
"-Dsonar.cxx.cppcheck.reportPath=" + param . getCppCheckReportPath ( ) + " " +
"-Dsonar.projectBaseDir=" + param . getProjectPath ( ) ;
SystemUtil . executeAndGetExitStatus ( command ) ;
@ -93,10 +90,10 @@ public class SonarService {
"-Dsonar.host.url=" + sonarUrl + " " +
"-Dsonar.sourceEncoding=utf-8 " +
"-Dsonar.projectKey=" + param . getProjectKey ( ) + " " +
"-Dsonar.login=" + sonarToken + " " +
"-Dsonar.cxx.cppcheck.reportPath=" + param . getCppCheckReportPath ( ) + " " +
"-Dsonar.projectBaseDir=" + param . getProjectPath ( ) ;
SystemUtil . executeAndGetExitStatus ( command ) ;
SystemUtil . ExecuteResp executeResp = SystemUtil . executeAndGetExitStatus ( command ) ;
log . info ( "command:{}, result:{}" , command , executeResp . getOutput ( ) ) ;
} ) ;
}
@ -188,7 +185,6 @@ public class SonarService {
"-Dsonar.host.url=" + sonarUrl + " " +
"-Dsonar.sourceEncoding=utf-8 " +
"-Dsonar.projectKey=" + key + " " +
"-Dsonar.login=" + sonarToken + " " +
"-Dsonar.java.binaries=./ " +
"-Dsonar.projectBaseDir=" + projectPath ;
log . info ( "projectPath:{},key:{}, command: {}" , projectPath , key , command ) ;