Class RequireFilesExist
java.lang.Object
org.apache.maven.enforcer.rule.api.AbstractEnforcerRuleBase
org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
org.apache.maven.enforcer.rules.files.AbstractRequireFiles
org.apache.maven.enforcer.rules.files.RequireFilesExist
- All Implemented Interfaces:
EnforcerRuleBase
The Class RequireFilesExist.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
Check one file.(package private) String
Gets the error msg.private boolean
osIndependentNameMatch
(File file, boolean defaultValue) OSes like Windows are case insensitive, so this method will compare the file path with the actual path.Methods inherited from class org.apache.maven.enforcer.rules.files.AbstractRequireFiles
execute, getCacheId, getFiles, setAllowNulls, setFilesList, setSatisfyAny, toString
Methods inherited from class org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
formatLocation, getMessage, setMessage
Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
getLevel
Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRuleBase
getLog, setLog
-
Constructor Details
-
RequireFilesExist
public RequireFilesExist()
-
-
Method Details
-
checkFile
Description copied from class:AbstractRequireFiles
Check one file.- Specified by:
checkFile
in classAbstractRequireFiles
- Parameters:
file
- the file- Returns:
true
if successful
-
getErrorMsg
String getErrorMsg()Description copied from class:AbstractRequireFiles
Gets the error msg.- Specified by:
getErrorMsg
in classAbstractRequireFiles
- Returns:
- the error msg
-
osIndependentNameMatch
OSes like Windows are case insensitive, so this method will compare the file path with the actual path. A simpleFile.exists()
is not enough for such OS.- Parameters:
file
- the file to verifydefaultValue
- value to return in case an IO exception occurs, should never happen as the file already exists- Returns:
-