VirtualFile (@NotNull File mavenHome) { File[] files = mavenHome.listFiles(); if (files == null) return null; for (File library : files) { for (Pair<Pattern, String> path : SUPER_POM_PATHS) { if (path.first.matcher(library.getName()).matches()) { VirtualFile libraryVirtualFile = LocalFileSystem.getInstance().findFileByNioFile(library.toPath()); if (libraryVirtualFile == null) continue; VirtualFile root = JarFileSystem.getInstance().getJarRootForLocalFile(libraryVirtualFile); if (root == null) continue; VirtualFile pomFile = root.findFileByRelativePath(path.second); if (pomFile != null) { return pomFile; } } } } return null; }