|
|
@ -42,8 +42,8 @@ public class SonarService {
|
|
|
|
@Value("${sonar.url}")
|
|
|
|
@Value("${sonar.url}")
|
|
|
|
String sonarUrl;
|
|
|
|
String sonarUrl;
|
|
|
|
|
|
|
|
|
|
|
|
// @Value("${sonar.token}")
|
|
|
|
@Value("${sonar.token}")
|
|
|
|
// String sonarToken;
|
|
|
|
String sonarToken;
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${extract.path}")
|
|
|
|
@Value("${extract.path}")
|
|
|
|
String extractProgramPath;
|
|
|
|
String extractProgramPath;
|
|
|
@ -72,6 +72,7 @@ public class SonarService {
|
|
|
|
"-Dsonar.host.url=" + sonarUrl + " " +
|
|
|
|
"-Dsonar.host.url=" + sonarUrl + " " +
|
|
|
|
"-Dsonar.sourceEncoding=utf-8 " +
|
|
|
|
"-Dsonar.sourceEncoding=utf-8 " +
|
|
|
|
"-Dsonar.projectKey=" + param.getProjectKey() + " " +
|
|
|
|
"-Dsonar.projectKey=" + param.getProjectKey() + " " +
|
|
|
|
|
|
|
|
"-Dsonar.login=" + sonarToken +
|
|
|
|
"-Dsonar.projectBaseDir=" + param.getProjectPath();
|
|
|
|
"-Dsonar.projectBaseDir=" + param.getProjectPath();
|
|
|
|
|
|
|
|
|
|
|
|
SystemUtil.ExecuteResp executeResp = SystemUtil.executeAndGetExitStatus(command);
|
|
|
|
SystemUtil.ExecuteResp executeResp = SystemUtil.executeAndGetExitStatus(command);
|
|
|
@ -82,6 +83,7 @@ public class SonarService {
|
|
|
|
"&& sonar-scanner " +
|
|
|
|
"&& sonar-scanner " +
|
|
|
|
"-Dsonar.host.url=" + sonarUrl + " " +
|
|
|
|
"-Dsonar.host.url=" + sonarUrl + " " +
|
|
|
|
"-Dsonar.sourceEncoding=utf-8 " +
|
|
|
|
"-Dsonar.sourceEncoding=utf-8 " +
|
|
|
|
|
|
|
|
"-Dsonar.login=" + sonarToken +
|
|
|
|
"-Dsonar.projectKey=" + param.getProjectKey() + " " +
|
|
|
|
"-Dsonar.projectKey=" + param.getProjectKey() + " " +
|
|
|
|
"-Dsonar.cxx.cppcheck.reportPath=" + param.getCppCheckReportPath() + " " +
|
|
|
|
"-Dsonar.cxx.cppcheck.reportPath=" + param.getCppCheckReportPath() + " " +
|
|
|
|
"-Dsonar.projectBaseDir=" + param.getProjectPath();
|
|
|
|
"-Dsonar.projectBaseDir=" + param.getProjectPath();
|
|
|
@ -93,6 +95,7 @@ public class SonarService {
|
|
|
|
"&& sonar-scanner " +
|
|
|
|
"&& sonar-scanner " +
|
|
|
|
"-Dsonar.host.url=" + sonarUrl + " " +
|
|
|
|
"-Dsonar.host.url=" + sonarUrl + " " +
|
|
|
|
"-Dsonar.sourceEncoding=utf-8 " +
|
|
|
|
"-Dsonar.sourceEncoding=utf-8 " +
|
|
|
|
|
|
|
|
"-Dsonar.login=" + sonarToken +
|
|
|
|
"-Dsonar.projectKey=" + param.getProjectKey() + " " +
|
|
|
|
"-Dsonar.projectKey=" + param.getProjectKey() + " " +
|
|
|
|
"-Dsonar.cxx.cppcheck.reportPath=" + param.getCppCheckReportPath() + " " +
|
|
|
|
"-Dsonar.cxx.cppcheck.reportPath=" + param.getCppCheckReportPath() + " " +
|
|
|
|
"-Dsonar.projectBaseDir=" + param.getProjectPath();
|
|
|
|
"-Dsonar.projectBaseDir=" + param.getProjectPath();
|
|
|
@ -190,6 +193,7 @@ public class SonarService {
|
|
|
|
"-Dsonar.sourceEncoding=utf-8 " +
|
|
|
|
"-Dsonar.sourceEncoding=utf-8 " +
|
|
|
|
"-Dsonar.projectKey=" + key + " " +
|
|
|
|
"-Dsonar.projectKey=" + key + " " +
|
|
|
|
"-Dsonar.java.binaries=./ " +
|
|
|
|
"-Dsonar.java.binaries=./ " +
|
|
|
|
|
|
|
|
"-Dsonar.login=" + sonarToken +
|
|
|
|
"-Dsonar.projectBaseDir=" + projectPath;
|
|
|
|
"-Dsonar.projectBaseDir=" + projectPath;
|
|
|
|
log.info("projectPath:{},key:{}, command: {}", projectPath, key, command);
|
|
|
|
log.info("projectPath:{},key:{}, command: {}", projectPath, key, command);
|
|
|
|
SystemUtil.executeAndGetExitStatus(command);
|
|
|
|
SystemUtil.executeAndGetExitStatus(command);
|
|
|
|