Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aether-users] How to download just the POM of an artifact?

Hi all,

what is the right request to just download a POM file from a remote
repository?

I tried issuing a

  new ArtifactRequest(new DefaultArtifact(groupId, artifactId, "pom",
version), repos, null);

and likewise a

  new ArtifactDescriptorRequest(new DefaultArtifact(groupId, artifactId,
"pom", version), repos, null);

but to no avail. If the artifact in question is not of packaging "pom"
the requests yield results whose result.getArtifact().getFile() is null.

Of course I could force downloading of POMs by issuing a more complex
DependencyRequest which requires the POM file to be downloaded, but this
is an awfully indirect way of doing things. So, is there a more direct
way of achieving what I want (preferably with Sonatype Aether 0.13.1,
which I still have to use)?

Best wishes,

Andreas
-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940


Back to the top