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?