Maven: get all dependencies programmatically
问题 How can I programmatically get all dependencies of a Maven module outside a Maven execution environment? So far I have: via maven-core: Path pomPath = ...; MavenXpp3Reader reader = new MavenXpp3Reader(); try (InputStream is = Files.newInputStream(pomPath)) { Model model = reader.read(is); this.mavenProject = new MavenProject(model); } and via jcabi-aether: File localRepo = Paths.get(System.getProperty("user.home"), ".m2").toFile(); new Classpath(mavenProject, localRepo, "runtime") Is this