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 String
getDestination()
List<String>
getExcludes()
Retrieve the list of files to exclude from the package.boolean
getFailIfLocationNotExists()
List<String>
getIncludes()
Retrieve the list of files to include in the package.String
getLocation()
Retrieve the location holding the file(s) to install.boolean
getNoDefaultExcludes()
Retrieve the default exclude status.String
getTargetArchitecture()
String
getTargetOSName()
boolean
isFilter()
boolean
isSingleDir()
void
setDestination(String destination)
Sets the destination file name.void
setExcludes(List<String> excl)
Set the list of files to exclude from the package.void
setFailIfLocationNotExists(boolean failIfLocationNotExists)
void
setFilter(boolean filter)
void
setIncludes(List<String> incl)
Set the list of files to include in the package.void
setLocation(String loc)
Set the location holding the file(s) to install.void
setNoDefaultExcludes(boolean noDefExcl)
Set the default exclude status.void
setTargetArchitecture(String targetArch)
Sets aregular expression
that indicates that the files defined are only applicable if the expressionmatches
the architecture.void
setTargetOSName(String targetOSName)
Sets aregular expression
that indicates that the files defined are only applicable if the expressionmatches
the operating system name.String
toString()
-
-
-
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:
true
if the default excludes should be omitted.
-
setNoDefaultExcludes
public void setNoDefaultExcludes(boolean noDefExcl)
Set the default exclude status.- Parameters:
noDefExcl
-true
if 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
location
is afile
, not adirectory
.- Parameters:
destination
- The destination that thelocation
should be in the final rpm.
-
getTargetArchitecture
public String getTargetArchitecture()
- Returns:
- Returns the
targetArchitecture
.
-
setTargetArchitecture
public void setTargetArchitecture(String targetArch)
Sets aregular expression
that indicates that the files defined are only applicable if the expressionmatches
the architecture.In order to be backwards compatible, the targetArch will be converted to
lower case
for 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 expression
that indicates that the files defined are only applicable if the expressionmatches
the operating system name.- Parameters:
targetOSName
- ThetargetOSName
to 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
- Thefilter
to set.- Since:
- 2.0
-
getFailIfLocationNotExists
public boolean getFailIfLocationNotExists()
- Returns:
- Returns the
failIfLocationNotExists
.
-
setFailIfLocationNotExists
public void setFailIfLocationNotExists(boolean failIfLocationNotExists)
- Parameters:
failIfLocationNotExists
- ThefailIfLocationNotExists
to set.
-
isSingleDir
public boolean isSingleDir()
-
-