Java 类io.vertx.core.Launcher 实例源码

项目:vertx-stack    文件:DescriptorTest.java   
@Test
public void testResolutionWithDefaultDescriptorInVertxHome() {
  File home = new File("target/home");
  home.mkdirs();
  System.setProperty("vertx.home", home.getAbsolutePath());

  FileUtils.copyFile(new File("src/test/resources/stacks/core-with-system-variable.json"),
      new File(home, "vertx-stack.json"));

  List<String> args = new ArrayList<>();
  args.add("resolve");
  args.add("-Dvertx.version=3.1.0");
  Launcher.main(args.toArray(new String[args.size()]));

  assertThat(new File(home, "lib/vertx-core-3.1.0.jar")).isFile();
  System.clearProperty("vertx.home");
}
项目:AlipayWechatPlatform    文件:MainLauncher.java   
public static void main(String[] args) {
    //Force to use slf4j
    DefaultChannelId.newInstance();
    System.setProperty("vertx.logger-delegate-factory-class-name",
            "io.vertx.core.logging.SLF4JLogDelegateFactory");
    new Launcher().dispatch(args);
}
项目:vertx-acme4j    文件:TestApp.java   
public static void main(String... args) throws Exception {
    setupLogging();
    killProcessUsingPort(listenPort);
    if (getProperty("java.version", "").startsWith("9")) {
        setProperty("io.netty.noKeySetOptimization", "true");
    }
    try {
        Launcher.main(Stream.concat(Stream.of("run", TestApp.class.getName()), Stream.of(args)).toArray(String[]::new));
    } catch (Exception ex) {
        ex.printStackTrace();
        exit(3);
    }
}
项目:direwolves    文件:ServerEample.java   
public static void main(String[] args) {
    new Launcher().execute("run", MainVerticle.class.getName(),
                           "--conf=H:\\dev\\workspace\\direwolves\\standalone\\src\\main\\conf"
                           + "\\config.json");
//    new Launcher().execute("run", StartupVerticle.class.getName(),
//        "--conf=/home/edgar/dev/workspace/direwolves/standalone/src/main/conf"
//            + "/config.json");
  }
项目:vertx-stack    文件:DescriptorTest.java   
@Test
public void testResolutionOfCoreUsingSystemVariable() {
  List<String> args = new ArrayList<>();
  args.add("resolve");
  args.add("--dir=" + root.getAbsolutePath());
  args.add("-Dvertx.version=3.1.0");
  args.add(new File("src/test/resources/stacks/core-with-system-variable.json").getAbsolutePath());
  Launcher.main(args.toArray(new String[args.size()]));

  assertThat(new File(root, "vertx-core-3.1.0.jar")).isFile();
}
项目:vertx-stack    文件:DescriptorTest.java   
@Test
public void testResolutionWithDefaultDescriptor() {
  File defaultStack = new File("vertx-stack.json");
  FileUtils.copyFile(new File("src/test/resources/stacks/core-with-system-variable.json"),
      defaultStack);

  List<String> args = new ArrayList<>();
  args.add("resolve");
  args.add("--dir=" + root.getAbsolutePath());
  args.add("-Dvertx.version=3.1.0");
  Launcher.main(args.toArray(new String[args.size()]));

  assertThat(new File(root, "vertx-core-3.1.0.jar")).isFile();
  defaultStack.delete();
}
项目:direwolves    文件:DefinitionMain2.java   
public static void main(String[] args) {
  new Launcher().execute("run", ApiDefinitionVerticle.class.getName(),
                         "--cluster");
}
项目:direwolves    文件:DefinitionMain.java   
public static void main(String[] args) {
  new Launcher().execute("run", ApiDefinitionVerticle.class.getName(),
                         "--cluster",
                         "--conf=H:\\dev\\workspace\\direwolves\\definition\\src\\main\\conf"
                         + "\\definition.json");
}
项目:direwolves    文件:LocalServerEample.java   
public static void main(String[] args) {
  new Launcher().execute("run", MainVerticle.class.getName(),
                         "--conf=h:\\dev\\workspace\\direwolves\\standalone\\src\\main\\conf"
                         + "\\local-config.json");
}
项目:direwolves    文件:DispatchMain.java   
public static void main(String[] args) {
  new Launcher().execute("run", ApiDispatchVerticle.class.getName(),
                         "--cluster",
                         "--conf=H:\\dev\\workspace\\direwolves\\dispatch\\src\\main\\conf"
                         + "\\config.json");
}
项目:trucksimulation    文件:Bootstrapper.java   
public static void main(String[] args) throws IOException, InterruptedException {
    JsonObject conf = readConf();
    bootstrapCities(conf);
    checkOsmFile(conf);
    Launcher.main(args);
}
项目:vertx-discovery-service    文件:A.java   
public static void main(String[] args) {
  Launcher.executeCommand("run", "-cluster", A.class.getName(), "--instances=2");
}
项目:vertx-discovery-service    文件:A.java   
public static void main(String[] args) {
  Launcher.executeCommand("run", "-cluster", A.class.getName(), "--instances=2");
}