2

The class MavenProject has the method getDependencyArtifacts() that returns all projects direct dependencies, but it was deprecated.

This class also has the method getArtifacts() that returns all project's dependencies including the transitive ones.

There are any way to know when an artifact is coming from project's transitive tree or it is a direct one, so I can filter getArtifacts()'s contents in order to get only the direct ones?

Cristiano
  • 1,414
  • 15
  • 22

1 Answers1

1

getDependencies should return the information you're looking for.

Mureinik
  • 297,002
  • 52
  • 306
  • 350
  • 1
    Unfortunately it does not have what I need. Dependency does not have the associated file as Artifact has. – Cristiano Sep 22 '18 at 04:08