Class MavenResourceUtil

java.lang.Object
org.forgerock.util.test.MavenResourceUtil

public final class MavenResourceUtil extends Object
Utility methods for retrieving test resource files from the Maven project path.
  • Method Details

    • getFileForPath

      public static File getFileForPath(String relativePath)
      Get a file representation of the specified relative file resource path.
      Parameters:
      relativePath - The path to the file resource, relative to the root of the current project being compiled (i.e. relative to the basedir system property.
      Returns:
      An absolute File reference that can be used to access the resource, regardless of the current working directory.
    • getPath

      public static Path getPath(String relativePath)
      Get the appropriate path to the file having the specified relative path.
      Parameters:
      relativePath - The path to the file resource, relative to the root of the current project being compiled (i.e. relative to the basedir system property.
      Returns:
      An absolute Path that can be used to reference the resource, regardless of the current working directory.