public static Path getGroovyPluginLocation ( ) { String resourceName = ClassPathUtils . classNameToResourceName ( GROOVY2_COMPILER_PLUGIN_CLASS ) ; Path path = ClassPathUtils . findRootPathForResource ( resourceName , ExampleResourceLocator . class . getClassLoader ( ) ) ; if ( path == null ) { throw new IllegalStateException ( "couldn't find groovy2 plugin jar in the classpath." ) ; } return path ; }
Locate the classpath root which contains the groovy2 plugin .