Package org.apache.maven.model.path
Class DefaultPathTranslator
java.lang.Object
org.apache.maven.model.path.DefaultPathTranslator
- All Implemented Interfaces:
PathTranslator
Resolves relative paths against a specific base directory.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionalignToBaseDirectory
(String path, File basedir) Resolves the specified path against the given base directory.alignToBaseDirectory
(String path, Path basedir) Resolves the specified path against the given base directory.
-
Constructor Details
-
DefaultPathTranslator
public DefaultPathTranslator()
-
-
Method Details
-
alignToBaseDirectory
Description copied from interface:PathTranslator
Resolves the specified path against the given base directory. The resolved path will be absolute and uses the platform-specific file separator if a base directory is given. Otherwise, the input path will be returned unaltered.- Specified by:
alignToBaseDirectory
in interfacePathTranslator
- Parameters:
path
- The path to resolve, may benull
.basedir
- The base directory to resolve relative paths against, may benull
.- Returns:
- The resolved path or
null
if the input path wasnull
.
-
alignToBaseDirectory
Description copied from interface:PathTranslator
Resolves the specified path against the given base directory. The resolved path will be absolute and uses the platform-specific file separator if a base directory is given. Otherwise, the input path will be returned unaltered.- Specified by:
alignToBaseDirectory
in interfacePathTranslator
- Parameters:
path
- The path to resolve, may benull
.basedir
- The base directory to resolve relative paths against, may benull
.- Returns:
- The resolved path or
null
if the input path wasnull
.
-