public void mvn(@CliOption(key = "mavenCommand", mandatory = true, help = "User-specified Maven command (eg test:test)") final String command) throws IOException { getMavenOperations().executeMvnCommand(command); }
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) { getMavenOperations().addRepository(getMavenOperations().getFocusedModuleName(), new Repository(id, name, url)); }
@CliAvailabilityIndicator(PROJECT_SETUP_COMMAND) public boolean isCreateProjectAvailable() { return getMavenOperations().isCreateProjectAvailable(); }
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) { getMavenOperations().removeRepository(getMavenOperations().getFocusedModuleName(), new Repository(id, null, url)); }
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) { getMavenOperations().removeDependency(getMavenOperations().getFocusedModuleName(), groupId, artifactId, version, classifier); }
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) { getMavenOperations().addDependency(getMavenOperations().getFocusedModuleName(), groupId, artifactId, version, scope, classifier); }
getMavenOperations().createMultimoduleProject(topLevelPackage, projectName, majorJavaVersion, multimodule); } else { getMavenOperations().createProject(topLevelPackage, projectName, majorJavaVersion, packaging);
@CliAvailabilityIndicator({PERFORM_PACKAGE_COMMAND, PERFORM_ECLIPSE_COMMAND, PERFORM_TESTS_COMMAND, PERFORM_CLEAN_COMMAND, PERFORM_ASSEMBLY_COMMAND, PERFORM_COMMAND_COMMAND}) public boolean isPerformCommandAllowed() { return getMavenOperations().isFocusedProjectAvailable(); }
@CliCommand(value = MODULE_CREATE_COMMAND, help = "Creates a new Maven module in current *multimodule* project.") public void createModule(@CliOption(key = "moduleName", mandatory = true, help = "The name of the module to create.") final String moduleName, @CliOption( key = "packaging", help = "The Maven packaging of this module." + "Possible values are: `BUNDLE`, `EAR`, `ESA`, `JAR` and `WAR`." + "Default if option not present: `JAR` (equals to 'jar').", unspecifiedDefaultValue = JarPackaging.NAME) final PackagingProvider packaging, @CliOption( key = "artifactId", help = "The artifact ID of this module." + "Default if option not present: `--moduleName` value.") final String artifactId) { getMavenOperations().createModule(moduleName, packaging, artifactId); }
@CliAvailabilityIndicator({DEPENDENCY_ADD_COMMAND, DEPENDENCY_REMOVE_COMMAND}) public boolean isDependencyModificationAllowed() { return getMavenOperations().isFocusedProjectAvailable(); }
getMavenOperations().executeMvnCommand("generate-sources"); } catch (InterruptedException e) { e.printStackTrace();
@CliAvailabilityIndicator({REPOSITORY_ADD_COMMAND, REPOSITORY_REMOVE_COMMAND}) public boolean isRepositoryModificationAllowed() { return getMavenOperations().isFocusedProjectAvailable(); }
/** * {@inheritDoc} */ public void mvn(String parameters, String message) throws IOException { logger.log(Level.INFO, message + " ..."); try { getMavenOperations().executeMvnCommand(parameters); } catch (IOException e) { logger.log(Level.WARNING, message + " error !"); throw e; } catch (RuntimeException e) { logger.log(Level.WARNING, message + " error !"); throw e; } }