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 class
Deprecated.Builder class used to create Resource instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Resource
(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 returnsnull
now.Deprecated.Describe the resource target path.boolean
Deprecated.static Resource.Builder
Deprecated.Creates a newResource
builder instance.static Resource.Builder
newBuilder
(boolean withDefaults) Deprecated.Creates a newResource
builder instance using default values or not.static Resource.Builder
newBuilder
(Resource from) Deprecated.Creates a newResource
builder instance using the specified object as a basis.static Resource.Builder
newBuilder
(Resource from, boolean forceCopy) Deprecated.Creates a newResource
builder instance using the specified object as a basis.static Resource
Deprecated.Creates a newResource
instance.static Resource
newInstance
(boolean withDefaults) Deprecated.Creates a newResource
instance using default values or not.void
setMergeId
(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 newResource
instance using the specified directory.withExcludes
(Collection<String> excludes) Deprecated.Creates a newResource
instance using the specified excludes.withFiltering
(String filtering) Deprecated.Creates a newResource
instance using the specified filtering.withIncludes
(Collection<String> includes) Deprecated.Creates a newResource
instance using the specified includes.withTargetPath
(String targetPath) Deprecated.Creates a newResource
instance using the specified targetPath.Methods inherited from class org.apache.maven.api.model.FileSet
getDirectory, newBuilder, newBuilder
Methods inherited from class org.apache.maven.api.model.PatternSet
getExcludes, getImportedFrom, getIncludes, getLocation, getLocationKeys, getLocationKeyStream, newBuilder, newBuilder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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 theproperties
element and from the properties in the files listed in thefilters
element. Note: While the type of this field isString
for 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 newResource
instance using the specified includes.- Overrides:
withIncludes
in classFileSet
- Parameters:
includes
- the newCollection<String>
to use- Returns:
- a
Resource
with the specified includes
-
withExcludes
Deprecated.Creates a newResource
instance using the specified excludes.- Overrides:
withExcludes
in classFileSet
- Parameters:
excludes
- the newCollection<String>
to use- Returns:
- a
Resource
with the specified excludes
-
withDirectory
Deprecated.Creates a newResource
instance using the specified directory.- Overrides:
withDirectory
in classFileSet
- Parameters:
directory
- the newString
to use- Returns:
- a
Resource
with the specified directory
-
withTargetPath
-
withFiltering
-
newInstance
-
newInstance
-
newBuilder
Deprecated.Creates a newResource
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Deprecated.Creates a newResource
builder 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 newResource
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theResource
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Deprecated.Creates a newResource
builder instance using the specified object as a basis.- Parameters:
from
- theResource
instance 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 returnsnull
now. -
setMergeId
Deprecated.this was unused and has no replacement, this method is a no-op now. -
isFiltering
public boolean isFiltering()Deprecated. -
toString
-
<Source>
withresources
language.