@CliCommand( value = REPOSITORY_REMOVE_COMMAND, help = "Removes an existing repository from the Maven project object model (POM)") public void removeRepository( @CliOption(key = "id", mandatory = true, help = "The ID of the repository") final String id, @CliOption(key = "url", mandatory = true, help = "The URL of the repository") final String url) { mavenOperations.removeRepository( mavenOperations.getFocusedModuleName(), new Repository(id, null, url)); }
@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)); }
@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); }
@CliCommand( value = DEPENDENCY_ADD_COMMAND, help = "Adds a new dependency to the Maven project object model (POM)") public void addDependency( @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, @CliOption(key = "scope", help = "The scope of the dependency") final DependencyScope scope) { mavenOperations.addDependency( mavenOperations.getFocusedModuleName(), groupId, artifactId, version, scope, classifier); }