Add looking into maven.repo.local before other places
We want to look into .m2 cache just in case we already have an artifact there. This can help with fixing builds and testing new things. It also fixes problems encountered by few projects that require themselves
This commit is contained in:
parent
4e46797c53
commit
9b93db7e10
@ -56,6 +56,19 @@ public class JavadirWorkspaceReader implements WorkspaceReader {
|
|||||||
String version = artifact.getVersion();
|
String version = artifact.getVersion();
|
||||||
String wantedVersion = new String(version);
|
String wantedVersion = new String(version);
|
||||||
|
|
||||||
|
// let's check out local repo first
|
||||||
|
String m2_path = System.getProperty("maven.repo.local");
|
||||||
|
String gid_path = groupId.replace(".", File.separator);
|
||||||
|
String art_path = m2_path + File.separator + gid_path + File.separator + artifactId +
|
||||||
|
File.separator + version + File.separator + artifactId + "-" +
|
||||||
|
version + "." + artifact.getExtension();
|
||||||
|
|
||||||
|
ret = new File(art_path);
|
||||||
|
if (ret.isFile()) {
|
||||||
|
MavenJPackageDepmap.debug("Returning " + art_path.toString());
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
MavenJPackageDepmap.debug("Wanted GROUPID=" + groupId);
|
MavenJPackageDepmap.debug("Wanted GROUPID=" + groupId);
|
||||||
MavenJPackageDepmap.debug("Wanted ARTIFACTID=" + artifactId);
|
MavenJPackageDepmap.debug("Wanted ARTIFACTID=" + artifactId);
|
||||||
MavenJPackageDepmap.debug("Wanted VERSION=" + version);
|
MavenJPackageDepmap.debug("Wanted VERSION=" + version);
|
||||||
|
Loading…
Reference in New Issue
Block a user