Class RequireFilesExist
- java.lang.Object
-
- org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
-
- org.apache.maven.plugins.enforcer.AbstractRequireFiles
-
- org.apache.maven.plugins.enforcer.RequireFilesExist
-
- All Implemented Interfaces:
EnforcerRule
,EnforcerRule2
public class RequireFilesExist extends AbstractRequireFiles
The Class RequireFilesExist.
-
-
Constructor Summary
Constructors Constructor Description RequireFilesExist()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
checkFile(java.io.File file)
Check one file.(package private) java.lang.String
getErrorMsg()
Gets the error msg.private boolean
osIndependentNameMatch(java.io.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.plugins.enforcer.AbstractRequireFiles
execute, getCacheId, getFiles, isAllowNulls, isCacheable, isResultValid, setAllowNulls, setFiles
-
Methods inherited from class org.apache.maven.plugins.enforcer.AbstractStandardEnforcerRule
getLevel, getMessage, setLevel, setMessage
-
-
-
-
Method Detail
-
checkFile
boolean checkFile(java.io.File file)
Description copied from class:AbstractRequireFiles
Check one file.- Specified by:
checkFile
in classAbstractRequireFiles
- Parameters:
file
- the file- Returns:
true
if successful
-
getErrorMsg
java.lang.String getErrorMsg()
Description copied from class:AbstractRequireFiles
Gets the error msg.- Specified by:
getErrorMsg
in classAbstractRequireFiles
- Returns:
- the error msg
-
osIndependentNameMatch
private boolean osIndependentNameMatch(java.io.File file, boolean defaultValue)
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:
-
-