class WriteProjectFile extends AbstractCommand {

  @Override
  public void execute() throws Exception {
    assertTrue(1 == arguments.size());
    final Path projectFilePath = Paths.get(arguments.get(0));
    final ObjectMapper mapper = new ObjectMapper();
    if (Files.exists(projectFilePath)) {
      logger.warn("Project file already exists");
      return;
    }
    try (final BufferedWriter writer = newBufferedWriter(projectFilePath)) {
      mapper.writerWithDefaultPrettyPrinter().writeValue(writer, project);
    }
  }

}