Class Resource
java.lang.Object
org.apache.maven.api.model.PatternSet
org.apache.maven.api.model.FileSet
org.apache.maven.api.model.Resource
- All Implemented Interfaces:
Serializable,InputLocationTracker
@Deprecated(since="4.0.0")
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Resource
extends FileSet
implements Serializable, InputLocationTracker
Deprecated.
This element describes all of the classpath resources associated with a project
or unit tests.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.Builder class used to create Resource instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedResource(Resource.Builder builder) Deprecated.Constructor for this class, to be called from its subclasses andResource.Builder. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Whether resources are filtered to replace tokens with parameterised values or not.Deprecated.this was unused and has no replacement, this method returnsnullnow.Deprecated.Describe the resource target path.booleanDeprecated.static Resource.BuilderDeprecated.Creates a newResourcebuilder instance.static Resource.BuildernewBuilder(boolean withDefaults) Deprecated.Creates a newResourcebuilder instance using default values or not.static Resource.BuildernewBuilder(Resource from) Deprecated.Creates a newResourcebuilder instance using the specified object as a basis.static Resource.BuildernewBuilder(Resource from, boolean forceCopy) Deprecated.Creates a newResourcebuilder instance using the specified object as a basis.static ResourceDeprecated.Creates a newResourceinstance.static ResourcenewInstance(boolean withDefaults) Deprecated.Creates a newResourceinstance using default values or not.voidsetMergeId(String mergeId) Deprecated.this was unused and has no replacement, this method is a no-op now.toString()Deprecated.with()Deprecated.Creates a new builder with this object as the basis.withDirectory(String directory) Deprecated.Creates a newResourceinstance using the specified directory.withExcludes(Collection<String> excludes) Deprecated.Creates a newResourceinstance using the specified excludes.withFiltering(String filtering) Deprecated.Creates a newResourceinstance using the specified filtering.withIncludes(Collection<String> includes) Deprecated.Creates a newResourceinstance using the specified includes.withTargetPath(String targetPath) Deprecated.Creates a newResourceinstance using the specified targetPath.Methods inherited from class org.apache.maven.api.model.FileSet
getDirectory, newBuilder, newBuilderMethods inherited from class org.apache.maven.api.model.PatternSet
getExcludes, getImportedFrom, getIncludes, getLocation, getLocationKeys, getLocationKeyStream, newBuilder, newBuilderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.maven.api.model.InputLocationTracker
getImportedFrom, getLocation
-
Constructor Details
-
Resource
Deprecated.Constructor for this class, to be called from its subclasses andResource.Builder.- See Also:
-
-
Method Details
-
getTargetPath
Deprecated.Describe the resource target path. The path is relative to the target/classes directory (i.e.${project.build.outputDirectory}). For example, if you want that resource to appear in a specific package (org.apache.maven.messages), you must specify this element with this value:org/apache/maven/messages. This is not required if you simply put the resources in that directory structure at the source, however.- Returns:
- a
String
-
getFiltering
Deprecated.Whether resources are filtered to replace tokens with parameterised values or not. The values are taken from thepropertieselement and from the properties in the files listed in thefilterselement. Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBoolean. Default value isfalse.- Returns:
- a
String
-
with
Deprecated.Creates a new builder with this object as the basis. -
withIncludes
Deprecated.Creates a newResourceinstance using the specified includes.- Overrides:
withIncludesin classFileSet- Parameters:
includes- the newCollection<String>to use- Returns:
- a
Resourcewith the specified includes
-
withExcludes
Deprecated.Creates a newResourceinstance using the specified excludes.- Overrides:
withExcludesin classFileSet- Parameters:
excludes- the newCollection<String>to use- Returns:
- a
Resourcewith the specified excludes
-
withDirectory
Deprecated.Creates a newResourceinstance using the specified directory.- Overrides:
withDirectoryin classFileSet- Parameters:
directory- the newStringto use- Returns:
- a
Resourcewith the specified directory
-
withTargetPath
-
withFiltering
-
newInstance
-
newInstance
-
newBuilder
Deprecated.Creates a newResourcebuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Deprecated.Creates a newResourcebuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Deprecated.Creates a newResourcebuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theResourceinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Deprecated.Creates a newResourcebuilder instance using the specified object as a basis.- Parameters:
from- theResourceinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
getMergeId
Deprecated.this was unused and has no replacement, this method returnsnullnow. -
setMergeId
Deprecated.this was unused and has no replacement, this method is a no-op now. -
isFiltering
public boolean isFiltering()Deprecated. -
toString
-
<Source>withresourceslanguage.