private DependencyNode toDependencyNode ( ProjectBuildingRequest buildingRequest , DependencyNode parent , org . apache . maven . model . Dependency dependency ) throws ArtifactResolverException { final DefaultArtifactCoordinate coordinate = new DefaultArtifactCoordinate ( ) ; coordinate . setGroupId ( dependency . getGroupId ( ) ) ; coordinate . setArtifactId ( dependency . getArtifactId ( ) ) ; coordinate . setVersion ( dependency . getVersion ( ) ) ; final ArtifactType type = session . getRepositorySession ( ) . getArtifactTypeRegistry ( ) . get ( dependency . getType ( ) ) ; coordinate . setExtension ( type . getExtension ( ) ) ; coordinate . setClassifier ( type . getClassifier ( ) ) ; final Artifact artifact = artifactResolver . resolveArtifact ( buildingRequest , coordinate ) . getArtifact ( ) ; artifact . setScope ( dependency . getScope ( ) ) ; final DefaultDependencyNode node = new DefaultDependencyNode ( parent , artifact , dependency . getVersion ( ) , dependency . getScope ( ) , null ) ; return node ; }
Converts the dependency to a dependency node object .