Project currentProject = null;
for (String argument : args) {
+ if (argument.startsWith("--config-file=")) {
+ /* we already parsed this one. */
+ continue;
+ }
String value = argument.substring(argument.indexOf('=') + 1).trim();
if (argument.startsWith("--node=")) {
Node newNode = getNode(value);
}
}
+ int errorCode = 1;
if (currentProject != null) {
if (insertProject(currentProject)) {
outputWriter.println("Project \"" + currentProject.getName() + "\" successfully inserted.");
+ errorCode = 0;
} else {
outputWriter.println("Project \"" + currentProject.getName() + "\" was not successfully inserted.");
}
configuration.setProjects(projects);
configuration.save();
+
+ System.exit(errorCode);
}
/**
* {@inheritDoc}
*/
public void projectUploadFinished(Project project) {
- outputWriter.println("Project \"" + project.getName() + "\" has ben uploaded, starting insert...");
+ outputWriter.println("Project \"" + project.getName() + "\" has been uploaded, starting insert...");
}
/**