/** * Starts a builder of Bootique runtime, initializing it with provided command-line arguments. * * @param args command-line arguments. * @return Bootique object that can be customized and then executed as an app via {@link #exec()} method. * @since 0.17 */ public static Bootique app(Collection<String> args) { if (args == null) { args = Collections.emptyList(); } return app(BootiqueUtils.toArray(Objects.requireNonNull(args))); }
protected BQTestRuntimeBuilder(String[] args) { //exclude system variables and properties by setting the properties final HashMap<String, String> properties = new HashMap<>(); properties.put(EXCLUDE_SYSTEM_PROPERTIES, "true"); properties.put(EXCLUDE_SYSTEM_VARIABLES, "true"); this.properties = properties; this.bootique = Bootique.app(args).module(createPropertiesProvider()); }
/** * A generic main method that auto-loads available modules and runs Bootique stack. Useful for apps that don't * care to customize their "main()". * * @param args app arguments passed by the shell. * @since 0.17 */ public static void main(String[] args) { Bootique.app(args).autoLoadModules().exec().exit(); }
/** * Starts a builder of Bootique runtime, initializing it with provided * command-line arguments. * * @param args command-line arguments. * @return Bootique object that can be customized and then executed as an * app via {@link #exec()} method. * @since 0.17 */ public static Bootique app(Collection<String> args) { if (args == null) { args = Collections.emptyList(); } return app(BootiqueUtils.toArray(Objects.requireNonNull(args))); }
/** * A generic main method that auto-loads available modules and runs Bootique stack. Useful for apps that don't * care to customize their "main()". * * @param args app arguments passed by the shell. * @since 0.17 */ public static void main(String[] args) { Bootique.app(args).autoLoadModules().exec().exit(); }
/** Create the compiler runtime. * * @param args the command line arguments. * @return the runtime. */ @SuppressWarnings("static-method") protected BQRuntime createRuntime(String... args) { SARLStandaloneSetup.doPreSetup(); final BQRuntime runtime = Bootique.app(args).autoLoadModules().createRuntime(); SARLStandaloneSetup.doPostSetup(runtime.getInstance(Injector.class)); return runtime; }