Method (MavenExecutionRequest result) { try { Method method = result.getClass().getDeclaredMethod("setMultiModuleProjectDirectory", File.class); method.setAccessible(true); return method; } catch (NoSuchMethodException | SecurityException e) { return null; } }