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) booleanCheck one file.(package private) StringGets the error msg.private booleanosIndependentNameMatch(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, toStringMethods inherited from class org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
formatLocation, getMessage, setMessageMethods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
getLevelMethods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRuleBase
getLog, setLog
-
Constructor Details
-
RequireFilesExist
public RequireFilesExist()
-
-
Method Details
-
checkFile
Description copied from class:AbstractRequireFilesCheck one file.- Specified by:
checkFilein classAbstractRequireFiles- Parameters:
file- the file- Returns:
trueif successful
-
getErrorMsg
String getErrorMsg()Description copied from class:AbstractRequireFilesGets the error msg.- Specified by:
getErrorMsgin 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:
-