Maven MOJO transitive dependency resolution ordering from the bottom of the graph

432 views Asked by At

I'm resolving transitive dependencies in my MOJO and wish to have them returned in order from the bottom of the dependency tree up. Is this possible using Maven2? Here's my code so far:

Set<?> dependencyArtifacts = project.createArtifacts(artifactFactory,
  null, null);
ArtifactResolutionResult result = resolver.resolveTransitively(
  dependencyArtifacts, project.getArtifact(), remoteRepositories, localRepository,
  artifactMetadataSource);
Set<?> artifacts = result.getArtifacts();

As you can see the ArtifactResolutionResult getArtifacts method doesn't guarantee a sort order given the use of Set.

0

There are 0 answers