code: public static String getPathFromRoot(String path) {
          for (Pattern COMPILER_ROOT_PATTERN : COMPILER_ROOT_PATTERNS) {
              Matcher m = COMPILER_ROOT_PATTERN.matcher(path);
              if (m.find()) {
                  return m.group(m.groupCount()-1);
              }
          }
          return null;
      }
docs: Get the path relative to an artefact folder under grails-app i.e:
  
  Input: /usr/joe/project/grails-app/conf/BootStrap.groovy
  Output: BootStrap.groovy
  
  Input: /usr/joe/project/grails-app/domain/com/mystartup/Book.groovy
  Output: com/mystartup/Book.groovy
  
  @param path The path to evaluate
  @return The path relative to the root folder grails-app