public static void main(String[] args) throws Exception { CommandLine cmd = parseArgs(args); PropertiesConfiguration buildConfiguration = new PropertiesConfiguration("atlas-buildinfo.properties"); String appPath = "webapp/target/atlas-webapp-" + getProjectVersion(buildConfiguration); if (cmd.hasOption(APP_PATH)) { appPath = cmd.getOptionValue(APP_PATH); } setApplicationHome(); Configuration configuration = ApplicationProperties.get(); final String enableTLSFlag = configuration.getString(SecurityProperties.TLS_ENABLED); final int appPort = getApplicationPort(cmd, enableTLSFlag, configuration); System.setProperty(AtlasConstants.SYSTEM_PROPERTY_APP_PORT, String.valueOf(appPort)); final boolean enableTLS = isTLSEnabled(enableTLSFlag, appPort); configuration.setProperty(SecurityProperties.TLS_ENABLED, String.valueOf(enableTLS)); runSetupIfRequired(configuration); showStartupInfo(buildConfiguration, enableTLS, appPort); server = EmbeddedServer.newServer(appPort, appPath, enableTLS); server.start(); }
private static void shutdown() { server.stop(); }