private void installWar(WebAppContext context) { // here we run with the JS GUI, for convenience, if we can find it, else set up an empty dir // TODO pretty sure there is an option to monitor this dir and load changes to static content // NOTE: When running Brooklyn from an IDE (i.e. by launching BrooklynJavascriptGuiLauncher.main()) // you will need to ensure that the working directory is set to the brooklyn-ui repo folder. For IntelliJ, // set the 'Working directory' of the Run/Debug Configuration to $MODULE_DIR$/brooklyn-server/launcher. // For Eclipse, use the default option of ${workspace_loc:brooklyn-launcher}. // If the working directory is not set correctly, Brooklyn will be unable to find the jsgui .war // file and the 'gui not available' message will be shown. context.setWar(this.deployJsgui && findJsguiWebappInSource().isPresent() ? findJsguiWebappInSource().get() : ResourceUtils.create(this).doesUrlExist("classpath://brooklyn.war") ? Os.writeToTempFile(ResourceUtils.create(this).getResourceFromUrl("classpath://brooklyn.war"), "brooklyn", "war").getAbsolutePath() : createTempWebDirWithIndexHtml("Brooklyn REST API <p> (gui not available)")); }