Ejemplo n.º 1
0
  @CliCommand(
      value = DEPENDENCY_REMOVE_COMMAND,
      help = "Removes an existing dependency from the Maven project object model (POM)")
  public void removeDependency(
      @CliOption(key = "groupId", mandatory = true, help = "The group ID of the dependency")
          final String groupId,
      @CliOption(key = "artifactId", mandatory = true, help = "The artifact ID of the dependency")
          final String artifactId,
      @CliOption(key = "version", mandatory = true, help = "The version of the dependency")
          final String version,
      @CliOption(key = "classifier", help = "The classifier of the dependency")
          final String classifier) {

    mavenOperations.removeDependency(
        mavenOperations.getFocusedModuleName(), groupId, artifactId, version, classifier);
  }