[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aether-users] How find artifact POM URI / path in local repository without command system.ResolveArtifact()
|
Hi,
sure it will work. but i need to find the POM file path... I have a little bit hacked it :), AFAIK the path is created by groupID and artifactID and version... , if is not found on place where it should be, I searching whole groupID directory.
Its not very nice...but so far..its working..
String g = a.getGroupId().replaceAll("\\.", "\\\\");
File dir = new File(LocalRepoURI().toString() + "\\" + g + "\\" + a.getArtifactId() + "\\"+ a.getVersion() + "\\");
---------- Původní zpráva ----------
Od: Martin Klotz <Martin.Klotz@xxxxxxxxxxxx>
Komu: aether-users@xxxxxxxxxxx
Datum: 22. 4. 2015 21:01:10
Předmět: Re: [aether-users] How find artifact POM URI / path in local
repository without command system.ResolveArtifact()
Hello,
did you already try
Artifact artifact = new DefaultArtifact(groupId-String,
artifactId-String, "pom", version-String);
?
I'm not sure what will be downloaded by aether, only the pom or
the whole "thing".
But I know it's possible to use this configuration and maybe it
does what you'd like to
have.
Kind regards
Martin
On 04/22/2015 06:50 PM,
e92-330cd@xxxxxxxxx wrote:
Hello,
I am trying to avoid download JAR file to my specified
Artifact... so far so good, but I need to find path of POM file
in my local repository>
Artifact artifact = new DefaultArtifact(
ai.groupId+":"+ai.artifactId+":"+ai.version );
ArtifactDescriptorRequest descriptorRequest = new
ArtifactDescriptorRequest();
descriptorRequest.setArtifact( artifact );
descriptorRequest.setRepositories(
RepositoryFactory.newRepositories() );
ArtifactDescriptorResult descriptorResult =
system.readArtifactDescriptor( session, descriptorRequest );
Artifact a = descriptorResult.getArtifact();
ofcourse a.getFile is null. Can Aether somehow find the
location of POM?
Thanks
_______________________________________________
aether-users mailing list
aether-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aether-users
_______________________________________________
aether-users mailing list
aether-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aether-users