File dataStorageRoot = Utils.getDataStorageRoot(projectPath);
if (dataStorageRoot == null) {
System.err.println("Error: Cannot determine build data storage root for project " + projectPath);
return;
}
<BUG>runBuild(loader, dataStorageRoot, buildType, modulesSet, artifactsList, true);
}
public static void runBuild(JpsModelLoader loader, final File dataStorageRoot, BuildType buildType, Set<String> modulesSet,
List<String> artifactsList, final boolean includeTests) {
final BuildRunner buildRunner = new BuildRunner(loader, modulesSet, buildType, artifactsList, Collections.<String>emptyList(), Collections.<String, String>emptyMap());
final ConsoleMessageHandler messageHandler = new ConsoleMessageHandler();
try {
ProjectDescriptor descriptor = buildRunner.load(messageHandler, dataStorageRoot, new BuildFSState(true));
buildRunner.runBuild(descriptor, CanceledStatus.NULL, null, messageHandler, includeTests);</BUG>
}

File dataStorageRoot = Utils.getDataStorageRoot(projectPath);
if (dataStorageRoot == null) {
System.err.println("Error: Cannot determine build data storage root for project " + projectPath);
return;
}
try {
runBuild(loader, dataStorageRoot, buildType, modulesSet, artifactsList, true, new ConsoleMessageHandler());
}
