在许多帖子中,我看到Aether项目有助于处理工件存储库。我想要的是仅检索指定groupId和artifactId的最高版本。
在 Aether wiki 中,他们为org.apache.maven:maven-profile:2.2.1工件提供了一个案例,其中还指定了版本:
Dependency dependency =
new Dependency(
new DefaultArtifact("org.apache.maven:maven-profile:2.2.1"),
"compile"
);
但我需要取回版本,一个工件的最高版本。我怎么能这样做?