Apache NetBeans
Apache NetBeans
Latest release

Apache NetBeans 24

Download

How do I get a list of libraries/dependencies of a project?

  1. 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));
  2. These classpaths in cps contain all the libraries.

 — provided by Tomas Zezula