[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aether-users] is it possible create Artifact only from POM? not via command system.resolveArtifact
|
Hello,
AFAIK the only way how construct proper aether Artifact model with all information is by command:
result = system.resolveArtifact(session, artifactRequest).getArtifact();
- I am traing to AVOID downloading whole JAR files...due time optimalization. But I need basic Artifact coordinates + all dependencies.
- My only idea is do it via getDirectDependency command:
Artifact artifact = new DefaultArtifact( "org.eclipse.aether:aether-impl:1.0.0.v20140518" );
ArtifactDescriptorRequest descriptorRequest = new ArtifactDescriptorRequest();
descriptorRequest.setArtifact( artifact );
descriptorRequest.setRepositories( Booter.newRepositories( system, session ) );
ArtifactDescriptorResult descriptorResult = system.readArtifactDescriptor( session, descriptorRequest );
Artifact a = descriptorResult.getArtifact();
Any better solution? :)
Thanks