mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Make DependencyResolver in zeppelin-interpreter module not aware of ZEPPELIN_HOME
This commit is contained in:
parent
7b1b36accd
commit
6ee06b836a
1 changed files with 0 additions and 32 deletions
|
|
@ -63,11 +63,6 @@ public class DependencyResolver extends AbstractDependencyResolver {
|
|||
return load(artifact, new LinkedList<String>());
|
||||
}
|
||||
|
||||
public List<File> load(String artifact, String destPath)
|
||||
throws RepositoryException, IOException {
|
||||
return load(artifact, new LinkedList<String>(), destPath);
|
||||
}
|
||||
|
||||
public synchronized List<File> load(String artifact, Collection<String> excludes)
|
||||
throws RepositoryException, IOException {
|
||||
if (StringUtils.isBlank(artifact)) {
|
||||
|
|
@ -85,33 +80,6 @@ public class DependencyResolver extends AbstractDependencyResolver {
|
|||
return libs;
|
||||
}
|
||||
}
|
||||
|
||||
public List<File> load(String artifact, Collection<String> excludes, String destPath)
|
||||
throws RepositoryException, IOException {
|
||||
List<File> libs = new LinkedList<File>();
|
||||
|
||||
if (StringUtils.isNotBlank(artifact)) {
|
||||
libs = load(artifact, excludes);
|
||||
|
||||
// find home dir
|
||||
String home = System.getenv("ZEPPELIN_HOME");
|
||||
if (home == null) {
|
||||
home = System.getProperty("zeppelin.home");
|
||||
}
|
||||
if (home == null) {
|
||||
home = "..";
|
||||
}
|
||||
|
||||
for (File srcFile : libs) {
|
||||
File destFile = new File(home + "/" + destPath, srcFile.getName());
|
||||
if (!destFile.exists() || !FileUtils.contentEquals(srcFile, destFile)) {
|
||||
FileUtils.copyFile(srcFile, destFile);
|
||||
logger.info("copy {} to {}", srcFile.getAbsolutePath(), destPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
return libs;
|
||||
}
|
||||
|
||||
public List<File> load(String artifact, File destPath) throws IOException, RepositoryException {
|
||||
return load(artifact, new LinkedList<String>(), destPath);
|
||||
|
|
|
|||
Loading…
Reference in a new issue