Class Resource

java.lang.Object
org.apache.maven.shared.filtering.Resource

public class Resource extends Object
Since:
2.3
Author:
Olivier Lamy
  • Constructor Details

    • Resource

      public Resource()
  • Method Details

    • getIncludes

      public List<String> getIncludes()
    • setIncludes

      public void setIncludes(List<String> includes)
    • getExcludes

      public List<String> getExcludes()
    • setExcludes

      public void setExcludes(List<String> excludes)
    • getNonFilteredFiles

      public List<String> getNonFilteredFiles()
      Returns the list of Ant-style glob patterns that should be copied as-is (without filtering), even when this resource has <filtering>true</filtering>. Patterns are matched against the relative file path within the resource directory.
      Returns:
      the list of non-filtered file glob patterns (never null, may be empty)
      Since:
      3.4.0
    • setNonFilteredFiles

      public void setNonFilteredFiles(List<String> nonFilteredFiles)
      Sets the list of Ant-style glob patterns for files that should be copied without filtering.
      Parameters:
      nonFilteredFiles - the Ant-style glob patterns, e.g. **&#47;*.p12 or **&#47;certs/**
      Since:
      3.4.0
    • addNonFilteredFile

      public void addNonFilteredFile(String nonFilteredFile)
      Adds a single Ant-style glob pattern to the list of non-filtered files.
      Parameters:
      nonFilteredFile - the glob pattern to add
      Since:
      3.4.0
    • getDirectory

      public String getDirectory()
    • setDirectory

      public void setDirectory(String directory)
    • getTargetPath

      public String getTargetPath()
    • setTargetPath

      public void setTargetPath(String targetPath)
    • isFiltering

      public boolean isFiltering()
    • setFiltering

      public void setFiltering(boolean filtering)
    • getMergeId

      public String getMergeId()
    • setMergeId

      public void setMergeId(String mergeId)
    • getChangeDetection

      public ChangeDetection getChangeDetection()
      Returns the change detection strategy to apply when copying files from this resource. When set, this overrides the request-level AbstractMavenFilteringRequest.getChangeDetection() for files belonging to this resource.
      Returns:
      the per-resource change detection strategy, or null if not set (falls back to the request level)
      Since:
      4.0.0-beta-2
    • setChangeDetection

      public void setChangeDetection(ChangeDetection changeDetection)
      Sets the change detection strategy to apply when copying files from this resource.
      Parameters:
      changeDetection - the strategy, or null to inherit from the request level
      Since:
      4.0.0-beta-2
    • getEncoding

      public String getEncoding()
      Returns the per-resource input encoding override. When non-null, overrides the global encoding for reading this resource's files.
      Returns:
      the encoding override, or null if not set
      Since:
      4.0.0-beta-3
    • setEncoding

      public void setEncoding(String encoding)
      Sets the per-resource input encoding override.
      Parameters:
      encoding - the encoding override, or null to use the global encoding
      Since:
      4.0.0-beta-3
    • getOutputEncoding

      public String getOutputEncoding()
      Returns the per-resource output encoding override. When non-null, overrides the global outputEncoding for writing this resource's files. Setting this enables encoding conversion for the resource (e.g. reading ISO-8859-1 sources and writing UTF-8 output) without affecting other resources.
      Returns:
      the output encoding override, or null if not set
      Since:
      4.0.0-beta-3
    • setOutputEncoding

      public void setOutputEncoding(String outputEncoding)
      Sets the per-resource output encoding override.
      Parameters:
      outputEncoding - the output encoding override, or null to use the global output encoding
      Since:
      4.0.0-beta-3
    • addInclude

      public void addInclude(String include)
    • addExclude

      public void addExclude(String exclude)