MavenId (Throwable exception) { try { Field field = exception.getClass().getDeclaredField("extension"); field.setAccessible(true); CoreExtension extension = (CoreExtension)field.get(exception); return new MavenId(extension.getGroupId(), extension.getArtifactId(), extension.getVersion()); } catch (Throwable e) { return null; } }