Package com.diffplug.spotless.maven
Class FileLocator
java.lang.Object
com.diffplug.spotless.maven.FileLocator
-
Constructor Summary
ConstructorsConstructorDescriptionFileLocator(org.codehaus.plexus.resource.ResourceManager resourceManager, File baseDir, File buildDir) -
Method Summary
Modifier and TypeMethodDescriptionFinds the base directory of the Maven or Gradle project on which spotless is currently being executed.Finds the build directory (e.g.Finds the data directory that can be used for storing shared data such as downloaded files globally.locateFile(String path) If the given path is a local file returns it as such unchanged, otherwise extracts the given resource to a randomly-named file in the build folder.
-
Constructor Details
-
FileLocator
-
-
Method Details
-
locateFile
If the given path is a local file returns it as such unchanged, otherwise extracts the given resource to a randomly-named file in the build folder. -
getBaseDir
Finds the base directory of the Maven or Gradle project on which spotless is currently being executed.- Returns:
- The base directory of the current Maven or Gradel project.
-
getBuildDir
Finds the build directory (e.g./target) of the Maven or Gradle project on which spotless is currently being executed.- Returns:
- The project build directory of the current Maven or Gradle project.
-
getDataDir
Finds the data directory that can be used for storing shared data such as downloaded files globally. This is a directory in the local repository, e.g.~/.m2/repository/com/diffplus/spotless/spotless-data.- Returns:
- The directory for storing shared data.
-