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) booleancheckFile(java.io.File file)Check one file.(package private) java.lang.StringgetErrorMsg()Gets the error msg.private booleanosIndependentNameMatch(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:AbstractRequireFilesCheck one file.- Specified by:
checkFilein classAbstractRequireFiles- Parameters:
file- the file- Returns:
trueif successful
-
getErrorMsg
java.lang.String getErrorMsg()
Description copied from class:AbstractRequireFilesGets the error msg.- Specified by:
getErrorMsgin 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:
-
-