I'm writing a maven plugin to find out if the dependencies for a given application (local) exist in a different application (remote), this would let me see if the local program i have is compatible with a different program. I could use the artifactory URL to download the pom.xml file for that project, and the projects that depend on that, but I was told not to use the artifactory url because then it would be unstable if the directory name changed. So basically I have to download a file in the middle of a Mojo plugin, given the group id, artifact id, and version. I was thinking I could somehow modify the maven dependency plugin to do this but I don't understand that well enough. For a clearer example, I want to do something like this: https://github.com/JFrogDev/artifactory-client-java , except using the maven information to download instead of artifactory url.
Asked
Active
Viewed 40 times
0
-
Invoke dependency:get first to ensure you have a local copy. – Thorbjørn Ravn Andersen Jul 06 '17 at 16:02
-
I forgot to mention something important, I am looking through many remote poms and I don't know how many I have to look through, that is determined at runtime. So I don't think I can really use more goals. – legs Jul 06 '17 at 16:13
-
this answer : ( https://stackoverflow.com/a/39507385/5319064 )seems to include a way to get a repository url from the maven info, though actually I'll try to see first if i can actually get the file with the artifactory url. – legs Jul 06 '17 at 16:23
-
Maven is really geared towards working with locally cached files. Perhaps you should go outside Maven and just write a normal Java program using the current transport mechanism for Maven (Aether?) – Thorbjørn Ravn Andersen Jul 06 '17 at 16:32