Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Check ~/.m2/repository/groupId/version/artefactId
- String userHome = System.getProperty("user.home");
- File repositoryDir = new File(userHome + File.separator + ".m2" + File.separator + "repository");
- File groupDir = new File(repositoryDir + File.separator + groupPath);
- if (groupDir.exists() && version != null)
- {
- String pathname = groupDir + File.separator + artifactId + File.separator;
- pathname += version + File.separator + artifactId + "-" + version + ".jar";
- File file = new File(pathname);
- if (file.exists())
- return failsafeURL(file.getAbsolutePath());
- }
Add Comment
Please, Sign In to add comment