check if custom nexus is available or not before deploy the jar

This commit is contained in:
jiezhang-tlnd
2021-03-16 16:01:53 +08:00
parent 1faf28843b
commit 94914d676b

View File

@@ -134,10 +134,14 @@ public class NexusDownloader implements IDownloadHelper {
}
}
bos.flush();
if (bytesDownloaded == contentLength) {
MavenArtifactsHandler deployer = new MavenArtifactsHandler();
boolean canConnectUserLibrary = TalendLibsServerManager.getInstance().canConnectUserLibrary();
// if proxy artifact repository was configured, then do not deploy
boolean deploy = !TalendLibsServerManager.getInstance().isProxyArtifactRepoConfigured();
boolean deploy = canConnectUserLibrary
&& !TalendLibsServerManager.getInstance().isProxyArtifactRepoConfigured();
deployer.install(downloadedFile.getAbsolutePath(), mavenUri, deploy);
}
fireDownloadComplete();