void (List<File> classPath) { String[] dependencies = dependenciesOutput.split("\\n"); Pattern format = Pattern.compile( "^\\[INFO\\].*-\\s(?<groupId>[0-9a-z._\\-]+):(?<artifactId>[0-9a-z._\\-]+):jar:?(?<classifier>[a-z_]*):(?<version>[0-9a-z._\\-]+):(?<scope>(compile|runtime))$"); PathMacros pathMacros = PathMacros.getInstance(); String path = pathMacros.getValue(PathMacrosImpl.MAVEN_REPOSITORY); File mavenRepository = path == null ? new File(new File(PathManager.getHomePath(), ".m2"), "repository") : new File(path); for (String dep : dependencies) { Matcher matcher = format.matcher(dep); if (!matcher.matches()) { throw new IllegalArgumentException(dep); } @NotNull String groupId = matcher.group("groupId"); @NotNull String artifactId = matcher.group("artifactId"); @Nullable String classifier = StringUtils.trimToNull(matcher.group("classifier")); @NotNull String version = matcher.group("version"); MavenId mavenId = new MavenId(groupId, artifactId, version); File jar = MavenUtil.makeLocalRepositoryFile(mavenId, mavenRepository, "jar", classifier); if (!jar.isFile()) throw new IllegalStateException("File " + jar.getPath() + " not found"); classPath.add(jar); } }