Package org.codehaus.mojo.rpm
Class Source
- java.lang.Object
-
- org.codehaus.mojo.rpm.Source
-
- Direct Known Subclasses:
SoftlinkSource
public class Source extends Object
A description of a location where files to be packaged can be found.- Author:
- Bob Allison, Carlos, Brett Okken
-
-
Constructor Summary
Constructors Constructor Description Source()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDestination()List<String>getExcludes()Retrieve the list of files to exclude from the package.booleangetFailIfLocationNotExists()List<String>getIncludes()Retrieve the list of files to include in the package.StringgetLocation()Retrieve the location holding the file(s) to install.booleangetNoDefaultExcludes()Retrieve the default exclude status.StringgetTargetArchitecture()StringgetTargetOSName()booleanisFilter()booleanisSingleDir()voidsetDestination(String destination)Sets the destination file name.voidsetExcludes(List<String> excl)Set the list of files to exclude from the package.voidsetFailIfLocationNotExists(boolean failIfLocationNotExists)voidsetFilter(boolean filter)voidsetIncludes(List<String> incl)Set the list of files to include in the package.voidsetLocation(String loc)Set the location holding the file(s) to install.voidsetNoDefaultExcludes(boolean noDefExcl)Set the default exclude status.voidsetTargetArchitecture(String targetArch)Sets aregular expressionthat indicates that the files defined are only applicable if the expressionmatchesthe architecture.voidsetTargetOSName(String targetOSName)Sets aregular expressionthat indicates that the files defined are only applicable if the expressionmatchesthe operating system name.StringtoString()
-
-
-
Method Detail
-
getLocation
public String getLocation()
Retrieve the location holding the file(s) to install.- Returns:
- The location holding the file(s) to install.
-
setLocation
public void setLocation(String loc)
Set the location holding the file(s) to install.- Parameters:
loc- The new location holding the file(s) to install.
-
getIncludes
public List<String> getIncludes()
Retrieve the list of files to include in the package.- Returns:
- The list of files to include in the package.
-
setIncludes
public void setIncludes(List<String> incl)
Set the list of files to include in the package.- Parameters:
incl- The new list of files to include in the package.
-
getExcludes
public List<String> getExcludes()
Retrieve the list of files to exclude from the package.- Returns:
- The list of files to exclude from the package.
-
setExcludes
public void setExcludes(List<String> excl)
Set the list of files to exclude from the package.- Parameters:
excl- The new list of files to exclude from the package.
-
getNoDefaultExcludes
public boolean getNoDefaultExcludes()
Retrieve the default exclude status.- Returns:
trueif the default excludes should be omitted.
-
setNoDefaultExcludes
public void setNoDefaultExcludes(boolean noDefExcl)
Set the default exclude status.- Parameters:
noDefExcl-trueif the default excludes should be omitted.
-
getDestination
public String getDestination()
- Returns:
- Returns the
destination. - See Also:
setDestination(String)
-
setDestination
public void setDestination(String destination)
Sets the destination file name.NOTE: This is only applicable if the
locationis afile, not adirectory.- Parameters:
destination- The destination that thelocationshould be in the final rpm.
-
getTargetArchitecture
public String getTargetArchitecture()
- Returns:
- Returns the
targetArchitecture.
-
setTargetArchitecture
public void setTargetArchitecture(String targetArch)
Sets aregular expressionthat indicates that the files defined are only applicable if the expressionmatchesthe architecture.In order to be backwards compatible, the targetArch will be converted to
lower casefor the purpose of comparison.- Parameters:
targetArch- The target architecture to set.
-
getTargetOSName
public String getTargetOSName()
- Returns:
- Returns the
targetOSName. - Since:
- 2.0-beta-3
-
setTargetOSName
public void setTargetOSName(String targetOSName)
Sets aregular expressionthat indicates that the files defined are only applicable if the expressionmatchesthe operating system name.- Parameters:
targetOSName- ThetargetOSNameto set.- Since:
- 2.0-beta-3
-
isFilter
public boolean isFilter()
- Returns:
- Returns the
filter. - Since:
- 2.0
-
setFilter
public void setFilter(boolean filter)
- Parameters:
filter- Thefilterto set.- Since:
- 2.0
-
getFailIfLocationNotExists
public boolean getFailIfLocationNotExists()
- Returns:
- Returns the
failIfLocationNotExists.
-
setFailIfLocationNotExists
public void setFailIfLocationNotExists(boolean failIfLocationNotExists)
- Parameters:
failIfLocationNotExists- ThefailIfLocationNotExiststo set.
-
isSingleDir
public boolean isSingleDir()
-
-