public interface ProjectOperations
| Modifier and Type | Method and Description |
|---|---|
void |
addBuildPlugin(String moduleName,
Plugin plugin)
Attempts to add the specified build plugin.
|
void |
addBuildPlugin(String moduleName,
Plugin plugin,
boolean addToPluginManagement)
Attempts to add the specified build plugin.
|
void |
addBuildPlugins(String moduleName,
Collection<? extends Plugin> plugins)
Attempts to add the specified plugins.
|
void |
addBuildPlugins(String moduleName,
Collection<? extends Plugin> plugins,
boolean addToPluginManagement)
Attempts to add the specified plugins.
|
List<Dependency> |
addDependencies(String moduleName,
Collection<? extends Dependency> dependencies)
Attempts to add the specified dependencies.
|
List<Dependency> |
addDependencies(String moduleName,
Collection<? extends Dependency> dependencies,
boolean addToDependencyManagement,
boolean checkFullDependency)
Attempts to add the specified dependencies.
|
Dependency |
addDependency(String moduleName,
Dependency dependency)
Attempts to add the specified dependency.
|
Dependency |
addDependency(String moduleName,
Dependency dependency,
boolean addToDependencyManagement)
Attempts to add the specified dependency.
|
Dependency |
addDependency(String moduleName,
Dependency dependency,
boolean addToDependencyManagement,
boolean checkFullDependency)
Attempts to add the specified dependency.
|
Dependency |
addDependency(String moduleName,
String groupId,
String artifactId,
String version)
Allows addition of a JAR dependency to the POM.
|
Dependency |
addDependency(String moduleName,
String groupId,
String artifactId,
String version,
boolean addToDependencyManagement)
Allows addition of a JAR dependency to the POM.
|
Dependency |
addDependency(String moduleName,
String groupId,
String artifactId,
String version,
DependencyScope scope)
Allows addition of a JAR dependency to the POM.
|
Dependency |
addDependency(String moduleName,
String groupId,
String artifactId,
String version,
DependencyScope scope,
boolean addToDependencyManagement)
Allows addition of a JAR dependency to the POM.
|
Dependency |
addDependency(String moduleName,
String groupId,
String artifactId,
String version,
DependencyScope scope,
String classifier)
Allows addition of a JAR dependency to the POM.
|
Dependency |
addDependency(String moduleName,
String groupId,
String artifactId,
String version,
DependencyScope scope,
String classifier,
boolean addToDependencyManagement)
Allows addition of a JAR dependency to the POM.
|
void |
addElementToPluginExecution(String moduleName,
Plugin plugin,
String executionId,
String parentElementName,
String elementName,
Map<String,String> elementValues)
Attempts to add the specified element into the specified plugin execution.
|
void |
addElementToPluginExecution(String moduleName,
Plugin plugin,
String executionId,
String parentElementName,
String elementName,
Map<String,String> elementValues,
boolean addToPluginManagement)
Attempts to add the specified element into the specified plugin execution.
|
void |
addElementToPluginExecution(String moduleName,
Plugin plugin,
String executionId,
String parentElementName,
String elementName,
String elementValue)
Attempts to add the specified element into the specified plugin execution.
|
void |
addElementToPluginExecution(String moduleName,
Plugin plugin,
String executionId,
String parentElementName,
String elementName,
String elementValue,
boolean addToPluginManagement)
Attempts to add the specified element into the specified plugin execution.
|
void |
addFilter(String moduleName,
Filter filter)
Attempts to add the specified filter.
|
void |
addModuleDependency(String moduleToDependUpon)
Adds the given module as a dependency of the currently focused module.
|
void |
addModuleDependency(String moduleName,
String moduleToDependUpon)
Adds to the given module the dependency with a module.
|
void |
addModuleDependency(String moduleName,
String moduleToDependUpon,
boolean testDependency)
Adds to the given module the dependency with a module and with the
possibility of adding it only with test scope and type.
|
void |
addPackageToPluginExecution(String moduleName,
Plugin plugin,
String executionId,
String packageName)
Attempts to add the specified package into the specified plugin execution.
|
void |
addPackageToPluginExecution(String moduleName,
Plugin plugin,
String executionId,
String packageName,
boolean addToPluginManagement)
Attempts to add the specified package into the specified plugin execution.
|
void |
addPluginRepositories(String moduleName,
Collection<? extends Repository> repositories)
Attempts to add the specified plugin repositories.
|
void |
addPluginRepository(String moduleName,
Repository repository)
Attempts to add the specified plugin repository.
|
void |
addProperty(String moduleName,
Property property)
Attempts to add the specified property.
|
void |
addRepositories(String moduleName,
Collection<? extends Repository> repositories)
Attempts to add the specified repositories.
|
void |
addRepository(String moduleName,
Repository repository)
Attempts to add the specified repository.
|
void |
addResource(String moduleName,
Resource resource)
Attempts to add the specified resource.
|
Pom |
getFocusedModule()
|
String |
getFocusedModuleName()
Returns the name of the currently focussed module.
|
ProjectMetadata |
getFocusedProjectMetadata()
Returns the metadata for the currently focussed module.
|
String |
getFocusedProjectName() |
org.springframework.roo.model.JavaPackage |
getFocusedTopLevelPackage() |
Pom |
getModuleForFileIdentifier(String fileIdentifier)
Returns the module to which the given file belongs
|
Collection<String> |
getModuleNames()
Returns the names of each module in the user's project
|
PathResolver |
getPathResolver()
Convenience method to return the
PathResolver from the project's
ProjectMetadata. |
Pom |
getPomFromModuleName(String moduleName)
Returns the given module's
Pom |
Collection<Pom> |
getPoms()
Returns the
Poms for all modules of the user's project |
ProjectMetadata |
getProjectMetadata(String moduleName)
Returns the
ProjectMetadata for the given module. |
String |
getProjectName(String moduleName) |
org.springframework.roo.model.JavaPackage |
getTopLevelPackage(String moduleName) |
boolean |
isFeatureInstalled(Pom module,
String featureName)
Indicates whether any of the supplied features are installed in the
provided module.
|
boolean |
isFeatureInstalled(String... featureNames)
Indicates whether any of the supplied features are installed in any module of a
project.
|
boolean |
isFeatureInstalled(String featureName)
Indicates whether the supplied feature is installed in any module of a
project.
|
boolean |
isFocusedProjectAvailable()
Indicates whether the module whose name has the focus, if any, is
available.
|
boolean |
isModuleCreationAllowed()
Indicates whether the user can create a new project module
|
boolean |
isModuleFocusAllowed()
Indicates whether the user can change the focused module
|
boolean |
isMultimoduleProject()
Indicates whether the project is multimodule
|
boolean |
isProjectAvailable(String moduleName)
Indicates whether a module with the given name is available.
|
void |
removeBuildPlugin(String moduleName,
Plugin plugin)
Removes any plugins with the same groupId and artifactId as the given
plugin.
|
void |
removeBuildPluginImmediately(String moduleName,
Plugin plugin)
Removes any plugins with the same groupId and artifactId as the given
plugin and immediately writes the pom to the file system.
|
void |
removeBuildPlugins(String moduleName,
Collection<? extends Plugin> plugins)
Removes any plugins with the same groupId and artifactId as any of the
given plugins.
|
void |
removeDependencies(String moduleName,
Collection<? extends Dependency> dependencies)
Attempts to remove the specified dependencies.
|
void |
removeDependency(String moduleName,
Dependency dependency)
Attempts to remove the specified dependency.
|
void |
removeDependency(String moduleName,
String groupId,
String artifactId,
String version)
Allows remove of an existing JAR dependency from the POM.
|
void |
removeDependency(String moduleName,
String groupId,
String artifactId,
String version,
String classifier)
Allows remove of an existing JAR dependency from the POM.
|
void |
removeFilter(String moduleName,
Filter filter)
Attempts to remove the specified filter.
|
void |
removePluginRepository(String moduleName,
Repository repository)
Attempts to remove the specified plugin repository.
|
void |
removeProperty(String moduleName,
Property property)
Attempts to remove the specified property dependency.
|
void |
removeRepository(String moduleName,
Repository repository)
Attempts to remove the specified repository.
|
void |
removeResource(String moduleName,
Resource resource)
Attempts to remove the specified resource.
|
void |
setModule(Pom module)
Sets the currently focused module
|
void |
updateBuildPlugin(String moduleName,
Plugin plugin)
Verifies if the specified build plugin is present.
|
void |
updateDependencyScope(String moduleName,
Dependency dependency,
DependencyScope dependencyScope)
Attempts to update the scope of the specified dependency.
|
void |
updateProjectType(String moduleName,
ProjectType projectType)
Attempts to update the project packaging type as defined via
ProjectType. |
void addBuildPlugin(String moduleName, Plugin plugin)
ProjectMetadata#isBuildPluginRegistered(org.springframework.roo.project.Plugin)
, the method silently returns. Otherwise the plugin is added.
By default, includes the provided plugin into pluginManagement element.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)plugin - the plugin to add (required)void addBuildPlugin(String moduleName, Plugin plugin, boolean addToPluginManagement)
ProjectMetadata#isBuildPluginRegistered(org.springframework.roo.project.Plugin)
, the method silently returns. Otherwise the plugin is added.
If addToPluginManagement parameter has true value, the new plugin will be included into pluginManagement element. If false, the provided plugin will be included only as plugin.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)addToPluginManagement - boolean that indicates if the new Plugin
should be included into pluginManagement element or not.plugin - the plugin to add (required)void addBuildPlugins(String moduleName, Collection<? extends Plugin> plugins)
ProjectMetadata#isAllPluginRegistered(Plugin), the
method silently returns. Otherwise each new dependency is added.
By default, includes the provided plugin into pluginManagement element.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)plugins - the plugins to add (required)void addBuildPlugins(String moduleName, Collection<? extends Plugin> plugins, boolean addToPluginManagement)
ProjectMetadata#isAllPluginRegistered(Plugin), the
method silently returns. Otherwise each new dependency is added.
If addToPluginManagement parameter has true value, the new plugin will be included into pluginManagement element. If false, the provided plugin will be included only as plugin.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)addToPluginManagement - boolean that indicates if the new Plugin
should be included into pluginManagement element or not.plugins - the plugins to add (required)void addPackageToPluginExecution(String moduleName, Plugin plugin, String executionId, String packageName)
By default, includes the provided package into pluginManagement element.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)plugin - the plugin where add the package (required)executionId - the id of the plugin execution where add the package (required)packageName - the package to add (required)void addPackageToPluginExecution(String moduleName, Plugin plugin, String executionId, String packageName, boolean addToPluginManagement)
If addToPluginManagement parameter has true value, the new plugin will be included into pluginManagement element. If false, the provided plugin will be included only as plugin.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)plugin - the plugin where add the package (required)executionId - the id of the plugin execution where add the package (required)packageName - the package to add (required)addToPluginManagement - boolean that indicates if the new Plugin
should be included into pluginManagement element or not.void addElementToPluginExecution(String moduleName, Plugin plugin, String executionId, String parentElementName, String elementName, String elementValue)
By default, includes the provided element into pluginManagement element.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)plugin - the plugin where add the package (required)executionId - the id of the plugin execution where add the package (required)parentElementName - the parentElement name that should be included inside configuration elementelementName - the element name that should be included inside the parentElementName provided beforeelementValue - the value to add (required)void addElementToPluginExecution(String moduleName, Plugin plugin, String executionId, String parentElementName, String elementName, String elementValue, boolean addToPluginManagement)
By default, includes the provided element into pluginManagement element.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)plugin - the plugin where add the package (required)executionId - the id of the plugin execution where add the package (required)parentElementName - the parentElement name that should be included inside configuration elementelementName - the element name that should be included inside the parentElementName provided beforeelementValue - the value to add (required)addToPluginManagement - boolean that indicates if the new element
should be included into pluginManagement element or not.void addElementToPluginExecution(String moduleName, Plugin plugin, String executionId, String parentElementName, String elementName, Map<String,String> elementValues)
By default, includes the provided element into pluginManagement element.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)plugin - the plugin where add the package (required)executionId - the id of the plugin execution where add the package (required)parentElementName - the parentElement name that should be included inside configuration elementelementName - the element name that should be included inside the parentElementName provided beforeelementValues - the values to add (required)void addElementToPluginExecution(String moduleName, Plugin plugin, String executionId, String parentElementName, String elementName, Map<String,String> elementValues, boolean addToPluginManagement)
By default, includes the provided element into pluginManagement element.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)plugin - the plugin where add the package (required)executionId - the id of the plugin execution where add the package (required)parentElementName - the parentElement name that should be included inside configuration elementelementName - the element name that should be included inside the parentElementName provided beforeelementValues - the values to add (required)addToPluginManagement - boolean that indicates if the new element
should be included into pluginManagement element or not.List<Dependency> addDependencies(String moduleName, Collection<? extends Dependency> dependencies)
ProjectMetadata#isAllDependencyRegistered(Dependency), the method
silently returns. Otherwise each new dependency is added.
By default, includes the provided dependencies into dependencyManagement element.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)dependencies - the dependencies to add (required)List<Dependency> addDependencies(String moduleName, Collection<? extends Dependency> dependencies, boolean addToDependencyManagement, boolean checkFullDependency)
ProjectMetadata#isAllDependencyRegistered(Dependency), the method
silently returns. Otherwise each new dependency is added.
If addToDependencyManagement parameter has true value, the new dependency will be included into dependencyManagement element. If false, the provided dependency will be included only as dependency.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)dependencies - the dependencies to add (required)addToDependencyManagement - boolean that indicates if the new Dependency
should be included into dependencyManagement element or not.checkFullDependency - whether should check the existence with full
dependency element or only compare 'artifactId' and 'groupId'.Dependency addDependency(String moduleName, Dependency dependency)
ProjectMetadata#isDependencyRegistered(org.springframework.roo.project.Dependency)
, the method silently returns. Otherwise the dependency is added.
By default, includes the provided dependency into dependencyManagement element.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)dependency - the dependency to add (required)Dependency addDependency(String moduleName, Dependency dependency, boolean addToDependencyManagement)
ProjectMetadata#isDependencyRegistered(org.springframework.roo.project.Dependency)
, the method silently returns. Otherwise the dependency is added.
If addToDependencyManagement parameter has true value, the new dependency will be included into dependencyManagement element. If false, the provided dependency will be included only as dependency.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)dependency - the dependency to add (required)addToDependencyManagement - boolean that indicates if the new Dependency
should be included into dependencyManagement element or not.Dependency addDependency(String moduleName, Dependency dependency, boolean addToDependencyManagement, boolean checkFullDependency)
ProjectMetadata#isDependencyRegistered(org.springframework.roo.project.Dependency)
, the method silently returns. Otherwise the dependency is added.
If addToDependencyManagement parameter has true value, the new dependency will be included into dependencyManagement element. If false, the provided dependency will be included only as dependency.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)dependency - the dependency to add (required)addToDependencyManagement - boolean that indicates if the new Dependency
should be included into dependencyManagement element or not.checkFullDependency - whether should check the existence with full
dependency element or only compare 'artifactId' and 'groupId'.Dependency addDependency(String moduleName, String groupId, String artifactId, String version)
Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.
By default, includes the provided dependency into dependencyManagement element.
moduleName - the name of the module to act upon (required)groupId - the group id of the dependency (required)artifactId - the artifact id of the dependency (required)version - the version of the dependency (required)Dependency addDependency(String moduleName, String groupId, String artifactId, String version, boolean addToDependencyManagement)
Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.
If addToDependencyManagement parameter has true value, the new dependency will be included into dependencyManagement element. If false, the provided dependency will be included only as dependency.
moduleName - the name of the module to act upon (required)groupId - the group id of the dependency (required)artifactId - the artifact id of the dependency (required)version - the version of the dependency (required)addToDependencyManagement - boolean that indicates if the new Dependency
should be included into dependencyManagement element or not.Dependency addDependency(String moduleName, String groupId, String artifactId, String version, DependencyScope scope)
Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.
By default, includes the provided dependency into dependencyManagement element.
moduleName - the name of the module to act upon (required)groupId - the group id of the dependency (required)artifactId - the artifact id of the dependency (required)version - the version of the dependency (required)scope - the scope of the dependencyDependency addDependency(String moduleName, String groupId, String artifactId, String version, DependencyScope scope, boolean addToDependencyManagement)
Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.
If addToDependencyManagement parameter has true value, the new dependency will be included into dependencyManagement element. If false, the provided dependency will be included only as dependency.
moduleName - the name of the module to act upon (required)groupId - the group id of the dependency (required)artifactId - the artifact id of the dependency (required)version - the version of the dependency (required)scope - the scope of the dependencyaddToDependencyManagement - boolean that indicates if the new Dependency
should be included into dependencyManagement element or not.Dependency addDependency(String moduleName, String groupId, String artifactId, String version, DependencyScope scope, String classifier)
Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.
By default, includes the provided dependency into dependencyManagement element.
moduleName - the name of the module to act upon (required)groupId - the group id of the dependency (required)artifactId - the artifact id of the dependency (required)version - the version of the dependency (required)scope - the scope of the dependencyclassifier - the classifier of the dependencyDependency addDependency(String moduleName, String groupId, String artifactId, String version, DependencyScope scope, String classifier, boolean addToDependencyManagement)
Provides a convenient way for third parties to instruct end users how to use the CLI to add support for their projects without requiring the user to manually edit a pom.xml or write an add-on.
If addToDependencyManagement parameter has true value, the new dependency will be included into dependencyManagement element. If false, the provided dependency will be included only as dependency.
moduleName - the name of the module to act upon (required)groupId - the group id of the dependency (required)artifactId - the artifact id of the dependency (required)version - the version of the dependency (required)scope - the scope of the dependencyclassifier - the classifier of the dependencyaddToDependencyManagement - boolean that indicates if the new Dependency
should be included into dependencyManagement element or not.void addFilter(String moduleName, Filter filter)
ProjectMetadata#isFilterRegistered(org.springframework.roo.project.Filter)
, the method silently returns. Otherwise the filter is added.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)filter - the filter to add (required)void addModuleDependency(String moduleToDependUpon)
moduleToDependUpon - the name of the module to act upon (required)void addModuleDependency(String moduleName, String moduleToDependUpon)
moduleName - the name of the module where to install the dependency (required)moduleToDependUpon - the name of the module to act upon (required)void addModuleDependency(String moduleName, String moduleToDependUpon, boolean testDependency)
moduleName - the name of the module where to install the dependency (required)moduleToDependUpon - the name of the module to act upon (required)testDependency - whether the module dependency should be added with test
scope and as test type dependency.void addPluginRepositories(String moduleName, Collection<? extends Repository> repositories)
ProjectMetadata#isPluginRepositoryRegistered(Repository), the
method silently returns. Otherwise each new repository is added.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)repositories - a list of plugin repositories to add (required)void addPluginRepository(String moduleName, Repository repository)
ProjectMetadata#isPluginRepositoryRegistered(Repository), the
method silently returns. Otherwise the repository is added.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)repository - the plugin repository to add (required)void addProperty(String moduleName, Property property)
ProjectMetadata#isPropertyRegistered(org.springframework.roo.project.Property)
, the method silently returns. Otherwise the property is added.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)property - the property to add (required)void addRepositories(String moduleName, Collection<? extends Repository> repositories)
ProjectMetadata#isRepositoryRegistered(Repository), the method
silently returns. Otherwise each new repository is added.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)repositories - a list of repositories to add (required)void addRepository(String moduleName, Repository repository)
ProjectMetadata#isRepositoryRegistered(Repository), the method
silently returns. Otherwise the repository is added.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)repository - the repository to add (required)void addResource(String moduleName, Resource resource)
ProjectMetadata#isResourceRegistered(Resource), the
method silently returns. Otherwise the resource is added.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)resource - the resource to add (required)Pom getFocusedModule()
null if none of the above descriptors existString getFocusedModuleName()
File.separatorProjectMetadata getFocusedProjectMetadata()
null if no project metadata is availableString getFocusedProjectName()
org.springframework.roo.model.JavaPackage getFocusedTopLevelPackage()
Pom getModuleForFileIdentifier(String fileIdentifier)
fileIdentifier - the canonical path to look upCollection<String> getModuleNames()
null listPathResolver getPathResolver()
PathResolver from the project's
ProjectMetadata.PathResolver, or null if the project is unavailablePom getPomFromModuleName(String moduleName)
PommoduleName - the fully-qualified name of the module (required)Collection<Pom> getPoms()
Poms for all modules of the user's projectnull collectionProjectMetadata getProjectMetadata(String moduleName)
ProjectMetadata for the given module.moduleName - the module whose metadata is being requested (can be
empty to signify the root or only module)null if the metadata is not availableString getProjectName(String moduleName)
moduleName - the name of the module to act upon (required)org.springframework.roo.model.JavaPackage getTopLevelPackage(String moduleName)
moduleName - the name of the module to act upon (required)boolean isFeatureInstalled(String featureName)
featureName - the name of the feature (see FeatureNames for
available features)boolean isFeatureInstalled(String... featureNames)
featureNames - the names of the features (see FeatureNames
for available features)boolean isFeatureInstalled(Pom module, String featureName)
module - the Pom where to search the feature.featureName - the names of the feature (see FeatureNames
for available features)boolean isFocusedProjectAvailable()
boolean isModuleCreationAllowed()
boolean isModuleFocusAllowed()
boolean isMultimoduleProject()
boolean isProjectAvailable(String moduleName)
moduleName - the name of the module to act upon (can be blank)void removeBuildPlugin(String moduleName, Plugin plugin)
moduleName - the name of the module to act upon (required)plugin - the plugin to remove (can be null)IllegalArgumentException - if this method is called before the
ProjectMetadata is available, or if the on-disk
representation cannot be modified for any reasonvoid removeBuildPluginImmediately(String moduleName, Plugin plugin)
moduleName - the name of the module to act upon (required)plugin - the plugin to remove (can be null)IllegalArgumentException - if this method is called before the
ProjectMetadata is available, or if the on-disk
representation cannot be modified for any reasonvoid removeBuildPlugins(String moduleName, Collection<? extends Plugin> plugins)
moduleName - the name of the module to act upon (required)plugins - the plugins to remove; can be null, any
null elements will be quietly ignoredIllegalArgumentException - if this method is called before the
ProjectMetadata is available, or if the on-disk
representation cannot be modified for any reasonvoid removeDependencies(String moduleName, Collection<? extends Dependency> dependencies)
ProjectMetadata#isDependencyRegistered(Dependency), the method
silently returns. Otherwise each located dependency is removed.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)dependencies - the dependencies to remove (required)void removeDependency(String moduleName, Dependency dependency)
ProjectMetadata#isDependencyRegistered(Dependency), the method
silently returns. Otherwise the located dependency is removed.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)dependency - the dependency to remove (required)void removeDependency(String moduleName, String groupId, String artifactId, String version)
Provides a convenient way for third parties to instruct end users how to use the CLI to remove an unwanted dependency from their projects without requiring the user to manually edit a pom.xml or write an add-on.
moduleName - the name of the module to act upon (required)groupId - the group id of the dependency (required)artifactId - the artifact id of the dependency (required)version - the version of the dependency (required)void removeDependency(String moduleName, String groupId, String artifactId, String version, String classifier)
Provides a convenient way for third parties to instruct end users how to use the CLI to remove an unwanted dependency from their projects without requiring the user to manually edit a pom.xml or write an add-on.
moduleName - the name of the module to act upon (required)groupId - the group id of the dependency (required)artifactId - the artifact id of the dependency (required)version - the version of the dependency (required)classifier - the classifier of the dependencyvoid removeFilter(String moduleName, Filter filter)
ProjectMetadata#isFilterRegistered(org.springframework.roo.project.Filter)
, the method silently returns. Otherwise the located filter is removed.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)filter - the filter to remove (required)void removePluginRepository(String moduleName, Repository repository)
ProjectMetadata#isPluginRepositoryRegistered(Repository), the
method silently returns. Otherwise the located plugin repository is
removed.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)repository - the plugin repository to remove (required)void removeProperty(String moduleName, Property property)
ProjectMetadata#isPropertyRegistered(Property), the method
silently returns. Otherwise the located dependency is removed.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)property - the property to remove (required)void removeRepository(String moduleName, Repository repository)
ProjectMetadata#isRepositoryRegistered(Repository), the method
silently returns. Otherwise the located repository is removed.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)repository - the repository to remove (required)void removeResource(String moduleName, Resource resource)
ProjectMetadata#isResourceRegistered(Resource), the
method silently returns. Otherwise the located resource is removed.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)resource - the resource to remove (required)void setModule(Pom module)
module - the module to focus upon (required)void updateBuildPlugin(String moduleName, Plugin plugin)
ProjectMetadata#getBuildPluginsExcludingVersion(Plugin).
Always adds the presented plugin.moduleName - the name of the module to act upon (required)plugin - the build plugin to update (required)void updateDependencyScope(String moduleName, Dependency dependency, DependencyScope dependencyScope)
ProjectMetadata#isDependencyRegistered(Dependency), the method
silently returns. Otherwise the located dependency is updated.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)dependency - the dependency to update (required)dependencyScope - the dependency scope. May be null, in which case
the void updateProjectType(String moduleName, ProjectType projectType)
ProjectType. If the project packaging is not defined it will
create a new definition.
An exception is thrown if this method is called before there is
ProjectMetadata available, or if the on-disk representation
cannot be modified for any reason.
moduleName - the name of the module to act upon (required)projectType - the project type to update (required)Copyright © 2009–2017 Pivotal Software, Inc.. All rights reserved.