• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java InstallationException类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.github.eirslett.maven.plugins.frontend.lib.InstallationException的典型用法代码示例。如果您正苦于以下问题:Java InstallationException类的具体用法?Java InstallationException怎么用?Java InstallationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

InstallationException类属于com.github.eirslett.maven.plugins.frontend.lib包,在下文中一共展示了InstallationException类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setUp

点赞 3

import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; //导入依赖的package包/类
@Before
public void setUp() throws InstallationException, TaskRunnerException, IOException {
  tmpDir = new File(System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
  tmpDir.mkdirs();

  // get module dir
  URL res = Resources.getResource("helium/webpack.config.js");
  String resDir = new File(res.getFile()).getParent();
  File moduleDir = new File(resDir + "/../../../../zeppelin-web/src/app/");

  conf = new ZeppelinConfiguration();

  hbf = new HeliumBundleFactory(conf,
      nodeInstallationDir,
      tmpDir,
      new File(moduleDir, "tabledata"),
      new File(moduleDir, "visualization"),
      new File(moduleDir, "spell"));
  hbf.installNodeAndNpm();
  hbf.copyFrameworkModulesToInstallPath(true);
}
 

开发者ID:apache,
项目名称:zeppelin,
代码行数:22,
代码来源:HeliumBundleFactoryTest.java

示例2: newTask

点赞 3

import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; //导入依赖的package包/类
@Override
protected NodeTask newTask(FrontendPluginFactory factory, Config conf, ProxyConfig proxy,
    Map<String, String> env, String nodeVersion) throws InstallationException {
  Function<String, String> property = key -> conf.hasPath(key) ? conf.getString(key) : null;
  factory.getNPMInstaller(proxy)
      .setNpmVersion(npmVersion)
      .setNodeVersion(nodeVersion)
      .setNpmDownloadRoot(conf.getString("npm.downloadRoot"))
      .setUserName(property.apply("npm.username"))
      .setPassword(property.apply("npm.password"))
      .install();
  NpmRunner npm = factory.getNpmRunner(proxy, conf.getString("npm.registryURL"));
  return (cmd, args) -> {
    String cmdline = cmd + " " + Arrays.asList(args).stream().collect(Collectors.joining(" "));
    npm.execute(cmdline, env);
  };
}
 

开发者ID:jooby-project,
项目名称:jooby,
代码行数:18,
代码来源:Npm.java

示例3: newTask

点赞 3

import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; //导入依赖的package包/类
@Override
protected NodeTask newTask(FrontendPluginFactory factory, Config conf, ProxyConfig proxy,
    Map<String, String> env, String nodeVersion) throws InstallationException {
  Function<String, String> property = key -> conf.hasPath(key) ? conf.getString(key) : null;
  factory.getNPMInstaller(proxy)
      .setNpmVersion(yarnVersion)
      .setNodeVersion(nodeVersion)
      .setNpmDownloadRoot(conf.getString("yarn.downloadRoot"))
      .setUserName(property.apply("yarn.username"))
      .setPassword(property.apply("yarn.password"))
      .install();
  NpmRunner npm = factory.getNpmRunner(proxy, conf.getString("yarn.registryURL"));
  return (cmd, args) -> {
    String cmdline = cmd + " " + Arrays.asList(args).stream().collect(Collectors.joining(" "));
    npm.execute(cmdline, env);
  };
}
 

开发者ID:jooby-project,
项目名称:jooby,
代码行数:18,
代码来源:Yarn.java

示例4: execute

点赞 3

import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; //导入依赖的package包/类
@Override
public void execute(FrontendPluginFactory factory) throws InstallationException {
    ProxyConfig proxyConfig = MojoUtils.getProxyConfig(this.session, this.decrypter);
    Server server = MojoUtils.decryptServer(this.serverId, this.session, this.decrypter);
    if (null != server) {
        factory.getNodeInstaller(proxyConfig).setNodeDownloadRoot(this.nodeDownloadRoot)
            .setNodeVersion(this.nodeVersion).setPassword(server.getPassword())
            .setUserName(server.getUsername()).install();
        factory.getYarnInstaller(proxyConfig).setYarnDownloadRoot(this.yarnDownloadRoot)
            .setYarnVersion(this.yarnVersion).setUserName(server.getUsername())
            .setPassword(server.getPassword()).install();
    } else {
        factory.getNodeInstaller(proxyConfig).setNodeDownloadRoot(this.nodeDownloadRoot)
            .setNodeVersion(this.nodeVersion).install();
        factory.getYarnInstaller(proxyConfig).setYarnDownloadRoot(this.yarnDownloadRoot)
            .setYarnVersion(this.yarnVersion).install();
    }
}
 

开发者ID:eirslett,
项目名称:frontend-maven-plugin,
代码行数:19,
代码来源:InstallNodeAndYarnMojo.java

示例5: installNode

点赞 2

import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; //导入依赖的package包/类
private void installNode(Config conf, String version, ProxyConfig proxy,
    FrontendPluginFactory factory) throws InstallationException {
  NodeInstaller installer = factory.getNodeInstaller(proxy)
      .setNodeVersion(version)
      .setNodeDownloadRoot(conf.getString("node.downloadRoot"));

  installNpm(installer);
  installer.install();
}
 

开发者ID:jooby-project,
项目名称:jooby,
代码行数:10,
代码来源:Frontend.java

示例6: execute

点赞 2

import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; //导入依赖的package包/类
@Override
public void execute(FrontendPluginFactory factory) throws InstallationException {
    ProxyConfig proxyConfig = MojoUtils.getProxyConfig(session, decrypter);
    String nodeDownloadRoot = getNodeDownloadRoot();
    String npmDownloadRoot = getNpmDownloadRoot();
    Server server = MojoUtils.decryptServer(serverId, session, decrypter);
    if (null != server) {
        factory.getNodeInstaller(proxyConfig)
            .setNodeVersion(nodeVersion)
            .setNodeDownloadRoot(nodeDownloadRoot)
            .setNpmVersion(npmVersion)
            .setUserName(server.getUsername())
            .setPassword(server.getPassword())
            .install();
        factory.getNPMInstaller(proxyConfig)
            .setNodeVersion(nodeVersion)
            .setNpmVersion(npmVersion)
            .setNpmDownloadRoot(npmDownloadRoot)
            .setUserName(server.getUsername())
            .setPassword(server.getPassword())
            .install();
    } else {
        factory.getNodeInstaller(proxyConfig)
            .setNodeVersion(nodeVersion)
            .setNodeDownloadRoot(nodeDownloadRoot)
            .setNpmVersion(npmVersion)
            .install();
        factory.getNPMInstaller(proxyConfig)
            .setNodeVersion(this.nodeVersion)
            .setNpmVersion(this.npmVersion)
            .setNpmDownloadRoot(npmDownloadRoot)
            .install();
    }
}
 

开发者ID:eirslett,
项目名称:frontend-maven-plugin,
代码行数:35,
代码来源:InstallNodeAndNpmMojo.java

示例7: installIfNotInstalled

点赞 2

import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; //导入依赖的package包/类
/**
 * Installs node in ~/.wisdom/node/$version.
 * The installation process is the following:
 * <ol>
 * <li>download node</li>
 * <li>expand node to the right location</li>
 * </ol>
 * <p/>
 *
 * @throws java.io.IOException
 */
public void installIfNotInstalled() throws IOException {
    try {
        factory.getNodeAndNPMInstaller(proxy())
                .install(mojo.getNodeVersion(),
                        mojo.getNPMVersion(),
                        mojo.getNodeDistributionRootUrl(),
                        mojo.getNpmRegistryRootUrl() + "/npm/-/");
        if (!getNodeExecutable().isFile()) {
            throw new IOException("Node installation failed - " + getNodeExecutable().getAbsolutePath() + " does not exist");
        }
    } catch (InstallationException e) {
        throw new IOException(e);
    }
}
 

开发者ID:wisdom-framework,
项目名称:wisdom,
代码行数:26,
代码来源:NodeManager.java

示例8: testInstallNpm

点赞 2

import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; //导入依赖的package包/类
@Test
public void testInstallNpm() throws InstallationException {
  assertTrue(new File(nodeInstallationDir, "/node/npm").isFile());
  assertTrue(new File(nodeInstallationDir, "/node/node").isFile());
  assertTrue(new File(nodeInstallationDir, "/node/yarn/dist/bin/yarn").isFile());
}
 

开发者ID:apache,
项目名称:zeppelin,
代码行数:7,
代码来源:HeliumBundleFactoryTest.java

示例9: newTask

点赞 2

import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; //导入依赖的package包/类
protected abstract NodeTask newTask(FrontendPluginFactory factory, Config conf,
ProxyConfig proxy, Map<String, String> env, String nodeVersion) throws InstallationException;
 

开发者ID:jooby-project,
项目名称:jooby,
代码行数:3,
代码来源:Frontend.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)