Class DefaultSourceRoot
java.lang.Object
org.apache.maven.impl.DefaultSourceRoot
- All Implemented Interfaces:
- SourceRoot
A default implementation of 
SourceRoot built from the model.- 
Constructor SummaryConstructorsConstructorDescriptionDefaultSourceRoot(Path baseDir, ProjectScope scope, Resource resource) Creates a new instance from the given resource.DefaultSourceRoot(ProjectScope scope, Language language, Path directory) Creates a new instance for the given directory and scope.DefaultSourceRoot(ProjectScope scope, Language language, Path directory, List<String> includes, List<String> excludes) Creates a new instance for the given directory and scope.DefaultSourceRoot(Session session, Path baseDir, Source source) Creates a new instance from the given model.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the root directory where the sources are stored.booleanenabled()Returns whether the directory described by this source element should be included in the build.booleanReturns whether the two objects are of the same class with equal property values.excludes()Returns the patterns for the files to exclude.inthashCode()Returns a hash code value computed from all properties.includes()Returns the patterns for the files to include.language()Returns the language of the source files.matcher(Collection<String> defaultIncludes, boolean useDefaultExcludes) Returns a matcher combining the include and exclude patterns.module()Returns the name of the Java module (or other language-specific module) which is built by the sources.scope()Returns in which context the source files will be used.booleanReturns whether resources are filtered to replace tokens with parameterized values.Returns an explicit target path, overriding the default value.Returns the version of the platform where the code will be executed.
- 
Constructor Details- 
DefaultSourceRoot
- 
DefaultSourceRootCreates a new instance from the given resource. This is used for migration from the previous way of declaring resources.- Parameters:
- baseDir- the base directory for resolving relative paths
- scope- the scope of the resource (main or test)
- resource- a resource element from the model
 
- 
DefaultSourceRootCreates a new instance for the given directory and scope.- Parameters:
- scope- scope of source code (main or test)
- language- language of the source code
- directory- directory of the source code
 
- 
DefaultSourceRootpublic DefaultSourceRoot(ProjectScope scope, Language language, Path directory, List<String> includes, List<String> excludes) Creates a new instance for the given directory and scope.- Parameters:
- scope- scope of source code (main or test)
- language- language of the source code
- directory- directory of the source code
- includes- patterns for the files to include, or- nullor empty if unspecified
- excludes- patterns for the files to exclude, or- nullor empty if nothing to exclude
 
 
- 
- 
Method Details- 
directoryReturns the root directory where the sources are stored..- Specified by:
- directoryin interface- SourceRoot
- Returns:
- the root directory where the sources are stored
 
- 
includesReturns the patterns for the files to include..- Specified by:
- includesin interface- SourceRoot
- Returns:
- the patterns for the files to include
 
- 
excludesReturns the patterns for the files to exclude..- Specified by:
- excludesin interface- SourceRoot
- Returns:
- the patterns for the files to exclude
 
- 
matcherReturns a matcher combining the include and exclude patterns..- Specified by:
- matcherin interface- SourceRoot
- Parameters:
- defaultIncludes- the default includes if unspecified by the user
- useDefaultExcludes- whether to add the default set of patterns to exclude, mostly Source Code Management (SCM) files
- Returns:
- a matcher combining the include and exclude patterns
 
- 
scopeReturns in which context the source files will be used..- Specified by:
- scopein interface- SourceRoot
- Returns:
- in which context the source files will be used
 
- 
languageReturns the language of the source files..- Specified by:
- languagein interface- SourceRoot
- Returns:
- the language of the source files
 
- 
moduleReturns the name of the Java module (or other language-specific module) which is built by the sources..- Specified by:
- modulein interface- SourceRoot
- Returns:
- the name of the Java module (or other language-specific module) which is built by the sources
 
- 
targetVersionReturns the version of the platform where the code will be executed..- Specified by:
- targetVersionin interface- SourceRoot
- Returns:
- the version of the platform where the code will be executed
 
- 
targetPathReturns an explicit target path, overriding the default value..- Specified by:
- targetPathin interface- SourceRoot
- Returns:
- an explicit target path, overriding the default value
 
- 
stringFilteringpublic boolean stringFiltering()Returns whether resources are filtered to replace tokens with parameterized values..- Specified by:
- stringFilteringin interface- SourceRoot
- Returns:
- whether resources are filtered to replace tokens with parameterized values
 
- 
enabledpublic boolean enabled()Returns whether the directory described by this source element should be included in the build..- Specified by:
- enabledin interface- SourceRoot
- Returns:
- whether the directory described by this source element should be included in the build
 
- 
hashCode
- 
equalsReturns whether the two objects are of the same class with equal property values..
 
-