mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-66875
This commit is contained in:
+13
-3
@@ -29,8 +29,12 @@ public class MavenWorkspaceMap implements Serializable {
|
||||
private final THashMap<MavenId, Data> myMapping = new THashMap<MavenId, Data>();
|
||||
|
||||
public void register(@NotNull MavenId id, @NotNull File file) {
|
||||
register(id, file, null);
|
||||
}
|
||||
|
||||
public void register(@NotNull MavenId id, @NotNull File file, @Nullable File outputFile) {
|
||||
for (MavenId each : getAllIDs(id)) {
|
||||
myMapping.put(each, new Data(id, file));
|
||||
myMapping.put(each, new Data(id, file, outputFile));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,11 +74,17 @@ public class MavenWorkspaceMap implements Serializable {
|
||||
|
||||
public static class Data implements Serializable {
|
||||
public final MavenId originalId;
|
||||
public final File file;
|
||||
private final File file;
|
||||
private final File outputFile;
|
||||
|
||||
private Data(MavenId originalId, File file) {
|
||||
private Data(MavenId originalId, File file, File outputFile) {
|
||||
this.originalId = originalId;
|
||||
this.file = file;
|
||||
this.outputFile = outputFile;
|
||||
}
|
||||
|
||||
public File getFile(String type) {
|
||||
return outputFile == null || MavenConstants.POM_EXTENSION.equalsIgnoreCase(type) ? file : outputFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -76,9 +76,9 @@ public class CustomArtifactResolver extends DefaultArtifactResolver {
|
||||
if (resolved == null) return false;
|
||||
|
||||
a.setResolved(true);
|
||||
a.setFile(resolved.file);
|
||||
a.setFile(resolved.getFile(a.getType()));
|
||||
a.selectVersion(resolved.originalId.getVersion());
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -78,7 +78,7 @@ public class CustomMaven3ArtifactResolver extends DefaultArtifactResolver {
|
||||
if (resolved == null) return false;
|
||||
|
||||
a.setResolved(true);
|
||||
a.setFile(resolved.file);
|
||||
a.setFile(resolved.getFile(a.getType()));
|
||||
a.selectVersion(resolved.originalId.getVersion());
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user