code: protected String fixFilePath(File file) throws MojoExecutionException {
      File baseDir = getProject().getFile().getParentFile();
  
      if (file.isAbsolute() && !isRelativeToPath(new File(baseDir, getRelativePath()), file)) {
        return StringUtils.replace(getCanonicalPath(file), '\\', '/');
      }
  
      if (!file.isAbsolute()) {
        file = new File(baseDir, file.getPath());
      }
  
      String relative = getRelativePath(new File(baseDir, getRelativePath()), file);
      if (!(new File(relative)).isAbsolute()) {
        return StringUtils.replace(getRootPath(), '\\', '/') + "/" + relative;
      }
      //relative path was outside baseDir
  
      //if root path is absolute then try to get a path relative to root
      if ((new File(getRootPath())).isAbsolute()) {
        String s = getRelativePath(new File(getRootPath()), file);
  
        if (!(new File(s)).isAbsolute()) {
          return StringUtils.replace(getRootPath(), '\\', '/') + "/" + s;
        }
        else {
          // root path and the calculated path are absolute, so 
          // just return calculated path
          return s;
        }
      }
  
      //return absolute path to file
      return StringUtils.replace(file.getAbsolutePath(), '\\', '/');
    }
docs: Returns path expressed through rootPath and relativePath.
  
  @param file to be fixed
  @return fixed path
  @throws MojoExecutionException if something goes wrong