}
if (StringUtils.isNotBlank(command)) {
// This code can only works on Sonar 3.5+
- builder
- .setGlobalProperties(toMap(globalConfiguration))
- .setTaskCommand(command);
+ globalConfiguration.put("sonar.task", command);
+ builder.setGlobalProperties(toMap(globalConfiguration));
}
Batch batch = builder.build();
batch.execute();
}
public ProjectDefinition generateProjectDefinition() {
- if (StringUtils.isBlank(command) || "inspect".equals(command)) {
+ if (StringUtils.isBlank(command) || "scan".equals(command)) {
ProjectDefinition rootProject = defineProject(properties, null);
rootProjectWorkDir = rootProject.getWorkDir();
defineChildren(rootProject);