mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
package npm dependency module in binary package
This commit is contained in:
parent
b655fa6568
commit
f494dbd904
2 changed files with 32 additions and 4 deletions
|
|
@ -95,5 +95,13 @@
|
|||
<outputDirectory>/lib/interpreter</outputDirectory>
|
||||
<directory>../zeppelin-interpreter/target/lib</directory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<outputDirectory>/lib/node_modules/zeppelin-vis</outputDirectory>
|
||||
<directory>../zeppelin-web/src/app/visualization</directory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<outputDirectory>/lib/node_modules/zeppelin-tabledata</outputDirectory>
|
||||
<directory>../zeppelin-web/src/app/tabledata</directory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
|
|
|
|||
|
|
@ -101,10 +101,22 @@ public class ZeppelinServer extends Application {
|
|||
HeliumApplicationFactory heliumApplicationFactory = new HeliumApplicationFactory();
|
||||
HeliumVisualizationFactory heliumVisualizationFactory;
|
||||
|
||||
heliumVisualizationFactory = new HeliumVisualizationFactory(
|
||||
new File(conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO)),
|
||||
new File(conf.getRelativeDir("zeppelin-web/src/app/tabledata")),
|
||||
new File(conf.getRelativeDir("zeppelin-web/src/app/visualization")));
|
||||
if (isBinaryPackage(conf)) {
|
||||
/* In binary package, zeppelin-web/src/app/visualization and zeppelin-web/src/app/tabledata
|
||||
* are copied to lib/node_modules/zeppelin-vis, lib/node_modules/zeppelin-tabledata directory.
|
||||
* Check zeppelin/zeppelin-distribution/src/assemble/distribution.xml to see how they're
|
||||
* packaged into binary package.
|
||||
*/
|
||||
heliumVisualizationFactory = new HeliumVisualizationFactory(
|
||||
new File(conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO)),
|
||||
new File(conf.getRelativeDir("lib/node_modules/zeppelin-tabledata")),
|
||||
new File(conf.getRelativeDir("lib/node_modules/zeppelin-vis")));
|
||||
} else {
|
||||
heliumVisualizationFactory = new HeliumVisualizationFactory(
|
||||
new File(conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO)),
|
||||
new File(conf.getRelativeDir("zeppelin-web/src/app/tabledata")),
|
||||
new File(conf.getRelativeDir("zeppelin-web/src/app/visualization")));
|
||||
}
|
||||
|
||||
this.helium = new Helium(
|
||||
conf.getHeliumConfPath(),
|
||||
|
|
@ -367,5 +379,13 @@ public class ZeppelinServer extends Application {
|
|||
|
||||
return singletons;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if it is source build or binary package
|
||||
* @return
|
||||
*/
|
||||
private static boolean isBinaryPackage(ZeppelinConfiguration conf) {
|
||||
return !new File(conf.getRelativeDir("zeppelin-web")).isDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue