aslak

Untitled

Sep 14th, 2010
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. // Check ~/.m2/repository/groupId/version/artefactId
  2. String userHome = System.getProperty("user.home");
  3. File repositoryDir = new File(userHome + File.separator + ".m2" + File.separator + "repository");
  4. File groupDir = new File(repositoryDir + File.separator + groupPath);
  5. if (groupDir.exists() && version != null)
  6. {
  7. String pathname = groupDir + File.separator + artifactId + File.separator;
  8. pathname += version + File.separator + artifactId + "-" + version + ".jar";
  9. File file = new File(pathname);
  10. if (file.exists())
  11. return failsafeURL(file.getAbsolutePath());
  12. }
Add Comment
Please, Sign In to add comment