提交 bc62e96d 编写于 作者: J jurgen

Artifact version update. Version lookup fix.

上级 30cc0145
......@@ -92,7 +92,6 @@ public class DriverDependencies implements DBPDriverDependencies
}
private void resolveDependencies(DBRProgressMonitor monitor, DependencyNode ownerNode, Map<String, DependencyNode> libMap) throws IOException {
ownerNode.library.resolve(monitor);
Collection<? extends DBPDriverLibrary> dependencies = ownerNode.library.getDependencies(monitor);
if (dependencies != null && !dependencies.isEmpty()) {
for (DBPDriverLibrary dep : dependencies) {
......
......@@ -886,6 +886,11 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver
public void updateFiles()
{
resetDriverInstance();
for (DBPDriverLibrary library : libraries) {
if (!library.isDisabled()) {
library.resetVersion();
}
}
validateFilesPresence();
}
......
......@@ -58,7 +58,7 @@ public class DriverLibraryLocal extends DriverLibraryAbstract
}
@Override
public void resolve(DBRProgressMonitor monitor) throws IOException {
public void resetVersion() {
// do nothing
}
......
......@@ -74,10 +74,9 @@ public class DriverLibraryMavenArtifact extends DriverLibraryAbstract
}
@Override
public void resolve(DBRProgressMonitor monitor) throws IOException {
if (getArtifactVersion(monitor) == null) {
throw new IOException("Can't resolve artifact " + this + " version");
}
public void resetVersion() {
this.localVersion = null;
MavenRegistry.getInstance().resetArtifactInfo(reference);
}
@Nullable
......
......@@ -237,7 +237,7 @@ public class MavenArtifact
switch (versionRef) {
case MavenArtifactReference.VERSION_PATTERN_RELEASE:
versionInfo = releaseVersion;
if (!CommonUtils.isEmpty(versionRef) && isBetaVersion(versionRef)) {
if (!CommonUtils.isEmpty(versionInfo) && isBetaVersion(versionInfo)) {
versionInfo = null;
}
break;
......
......@@ -85,8 +85,6 @@ public interface DBPDriverLibrary
boolean isResolved();
void resolve(DBRProgressMonitor monitor) throws IOException;
@Nullable
String getExternalURL(DBRProgressMonitor monitor);
......@@ -100,4 +98,7 @@ public interface DBPDriverLibrary
void downloadLibraryFile(@NotNull DBRProgressMonitor monitor, boolean forceUpdate, String taskName)
throws IOException, InterruptedException;
void resetVersion();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册