Ejemplo n.º 1
0
  @CliCommand(
      value = REPOSITORY_ADD_COMMAND,
      help = "Adds a new repository to the Maven project object model (POM)")
  public void addRepository(
      @CliOption(key = "id", mandatory = true, help = "The ID of the repository") final String id,
      @CliOption(key = "name", mandatory = false, help = "The name of the repository")
          final String name,
      @CliOption(key = "url", mandatory = true, help = "The URL of the repository")
          final String url) {

    mavenOperations.addRepository(
        mavenOperations.getFocusedModuleName(), new Repository(id, name, url));
  }