org.apache.maven.model
Class Resource

java.lang.Object
  extended by org.apache.maven.model.PatternSet
      extended by org.apache.maven.model.FileSet
          extended by org.apache.maven.model.Resource
All Implemented Interfaces:
Serializable

public class Resource
extends FileSet
implements Serializable

This element describes all of the classpath resources associated with a project or unit tests.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
Resource()
           
 
Method Summary
 String getMergeId()
          Get FOR INTERNAL USE ONLY.
 String getModelEncoding()
           
 String getTargetPath()
          Get Describe the resource target path.
 void initMergeId()
           
 boolean isFiltering()
          Get Whether resources are filtered to replace tokens with parameterised values or not.
 void setFiltering(boolean filtering)
          Set Whether resources are filtered to replace tokens with parameterised values or not.
 void setMergeId(String mergeId)
          Set FOR INTERNAL USE ONLY.
 void setModelEncoding(String modelEncoding)
          Set an encoding used for reading/writing the model.
 void setTargetPath(String targetPath)
          Set Describe the resource target path.
 String toString()
           
 
Methods inherited from class org.apache.maven.model.FileSet
getDirectory, setDirectory
 
Methods inherited from class org.apache.maven.model.PatternSet
addExclude, addInclude, getExcludes, getIncludes, removeExclude, removeInclude, setExcludes, setIncludes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Method Detail

getMergeId

public String getMergeId()
Get FOR INTERNAL USE ONLY. This is a unique identifier assigned to each resource to allow Maven to merge changes to this resource that take place during the execution of a plugin. This field must be managed by the generated parser and formatter classes in order to allow it to survive model interpolation.

Returns:
String

getTargetPath

public String getTargetPath()
Get 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:
String

isFiltering

public boolean isFiltering()
Get Whether resources are filtered to replace tokens with parameterised values or not. The values are taken from the properties element and from the properties in the files listed in the filters element.

Returns:
boolean

setFiltering

public void setFiltering(boolean filtering)
Set Whether resources are filtered to replace tokens with parameterised values or not. The values are taken from the properties element and from the properties in the files listed in the filters element.

Parameters:
filtering -

setMergeId

public void setMergeId(String mergeId)
Set FOR INTERNAL USE ONLY. This is a unique identifier assigned to each resource to allow Maven to merge changes to this resource that take place during the execution of a plugin. This field must be managed by the generated parser and formatter classes in order to allow it to survive model interpolation.

Parameters:
mergeId -

setTargetPath

public void setTargetPath(String targetPath)
Set 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.

Parameters:
targetPath -

initMergeId

public void initMergeId()

toString

public String toString()
Overrides:
toString in class FileSet
See Also:
Object.toString()

setModelEncoding

public void setModelEncoding(String modelEncoding)
Set an encoding used for reading/writing the model.

Overrides:
setModelEncoding in class FileSet
Parameters:
modelEncoding - the encoding used when reading/writing the model.

getModelEncoding

public String getModelEncoding()
Overrides:
getModelEncoding in class FileSet
Returns:
the current encoding used when reading/writing this model.


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.