public interface PackagingProvider
| Modifier and Type | Method and Description |
|---|---|
String |
createArtifacts(org.springframework.roo.model.JavaPackage topLevelPackage,
String projectName,
String javaVersion,
GAV parentPom,
String moduleName,
ProjectOperations projectOperations)
Creates the initial set of artifacts (files and directories) for a module
with this type of packaging; this includes setting the POM's
/project/packaging element to the desired value. |
String |
getId()
Returns the unique identifier of this
PackagingProvider, for use
in the Roo user interface. |
Collection<Path> |
getPaths()
|
boolean |
isDefault()
Indicates whether this type of packaging should be used for new projects
and modules by default, i.e. when the user doesn't specify the packaging.
|
String createArtifacts(org.springframework.roo.model.JavaPackage topLevelPackage, String projectName, String javaVersion, GAV parentPom, String moduleName, ProjectOperations projectOperations)
/project/packaging element to the desired value.topLevelPackage - the top-level Java package for the new project or
module (required)nullableProjectName - the project name provided by the user (can be
blank)javaVersion - the Java version for this project or module (required)parentPom - the Maven coordinates of the parent POM (can be
null for none)moduleName - the name of the module being created (blank for the
root or only module)projectOperations - in case it's required (never null)String getId()
PackagingProvider, for use
in the Roo user interface.
The intent of this method is to allow third-party addons to provide
alternative behaviour for a given Maven packaging type. For example, the
core Roo WAR packaging type will have an ID of "war". If the user wants
to customise how WAR modules are generated, they can implement their own
PackagingProvider with an ID of (say) "custom-war". Then when the
user adds a new module to their project, the shell will offer them the
choice of "WAR" and "CUSTOM-WAR" for the packaging type.
Collection<Path> getPaths()
boolean isDefault()
If the user defines their own PackagingProviders, they should
ensure that at most one of them returns true from this
method.
Copyright © 2009–2017 Pivotal Software, Inc.. All rights reserved.