How do I get a list of libraries/dependencies of a project?
-
Get COMPILE classpaths of all Java non test source root.
Stream<ClassPath> cps = Arrays.stream(ProjectUtil.getSources(prj) .getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA)) .map((sg)->sg.getRootFolder()) .filter(nonTestRoot) .map((fo)->ClassPath.getClassPath(fo, ClassPath.COMPILE));
-
These classpaths in cps contain all the libraries.
— provided by Tomas Zezula