/** * gets the absolute path from a file that may be relative to the current directory. * * @param deployable - what to extract the file path from * @return - absolute path to the deployable */ String getAbsolutePath(Deployable deployable) { String path = deployable.getFile(); return getFileHandler().getAbsolutePath(path); }
/** * gets the absolute path from a file that may be relative to the current directory. * * @param deployable - what to extract the file path from * @return - absolute path to the deployable */ String getAbsolutePath(Deployable deployable) { String path = deployable.getFile(); return getFileHandler().getAbsolutePath(path); } }
/** * gets the absolute path from a file that may be relative to the current directory. * * @param deployable - what to extract the file path from * @return - absolute path to the deployable */ String getAbsolutePath(Deployable deployable) { String path = deployable.getFile(); return getFileHandler().getAbsolutePath(path); } }
/** * gets the absolute path from a file that may be relative to the current directory. * * @param deployable - what to extract the file path from * @return - absolute path to the deployable */ String getAbsolutePath(Deployable deployable) { String path = deployable.getFile(); return getFileHandler().getAbsolutePath(path); }
/** * Test relative to absolute path. */ public void testGetAbsolutePathFromRelative() { String path = this.fileHandler.getAbsolutePath("path"); assertEquals(path, System.getProperty("user.dir") + System.getProperty("file.separator") + "path"); }
/** * Test explicit to absolute path. */ public void testGetAbsolutePathFromExplicit() { String path = this.fileHandler.getAbsolutePath(System.getProperty("user.home")); assertEquals(path, System.getProperty("user.home")); }
"sshjava.shift." + getFileHandler().getAbsolutePath(toDeploy.getFile()), "deployables/" + new File(toDeploy.getFile()).getName()); java.setSystemProperty("sshjava.shift." + getFileHandler().getAbsolutePath(getHome()), "containers/" + getId());
/** * {@inheritDoc} */ @Override protected void invokeContainer(String action, JvmLauncher java) throws Exception { String base = getFileHandler().getAbsolutePath(getConfiguration().getHome()); java.setSystemProperty("catalina.home", getFileHandler().getAbsolutePath(getHome())); java.setSystemProperty("catalina.base", base); java.setSystemProperty("java.io.tmpdir", getFileHandler().append(base, "temp")); java.addClasspathEntries(new File(getHome(), "bin/bootstrap.jar")); addToolsJarToClasspath(java); java.setMainClass("org.apache.catalina.startup.Bootstrap"); java.addAppArguments(action); java.start(); } }
/** * {@inheritDoc} */ @Override protected void doStart(JvmLauncher java) throws Exception { final File swarmExecutable = new File(getHome()); swarmJvmLauncher.setJarFile(swarmExecutable); swarmJvmLauncher.setWorkingDirectory(new File(getFileHandler().getAbsolutePath( getConfiguration().getHome()))); final Configuration configuration = getConfiguration(); String jvmArgs = configuration.getPropertyValue(GeneralPropertySet.JVMARGS); if (jvmArgs == null || !jvmArgs.contains("-Dswarm.http.port=")) { swarmJvmLauncher.addJvmArguments("-Dswarm.http.port=" + getConfiguration().getPropertyValue(ServletPropertySet.PORT)); } WildFlySwarmStandaloneLocalConfiguration wildFlySwarmConfiguration = (WildFlySwarmStandaloneLocalConfiguration) configuration; File swarmProjectDescriptor = wildFlySwarmConfiguration.getSwarmProjectDescriptor(); if (swarmProjectDescriptor != null && swarmProjectDescriptor.exists()) { swarmJvmLauncher.addAppArgumentLine("-s " + swarmProjectDescriptor.getAbsolutePath()); } addDeployables(); getLogger().info("Swarm arg line: " + swarmJvmLauncher.getCommandLine(), getClass().getCanonicalName()); swarmJvmLauncher.start(); }
/** * {@inheritDoc} */ @Override protected void invokeContainer(String action, JvmLauncher java) throws Exception { String base = getFileHandler().getAbsolutePath(getConfiguration().getHome()); java.setSystemProperty("catalina.home", getFileHandler().getAbsolutePath(getHome())); java.setSystemProperty("catalina.base", base); java.setSystemProperty("java.io.tmpdir", getFileHandler().append(base, "temp")); java.addClasspathEntries(new File(getHome(), "bin/bootstrap.jar")); addToolsJarToClasspath(java); java.setMainClass("org.apache.catalina.startup.Bootstrap"); java.addAppArguments(action); java.start(); } }
String base = getFileHandler().getAbsolutePath(getConfiguration().getHome()); java.setSystemProperty("catalina.home", getFileHandler().getAbsolutePath(getHome())); java.setSystemProperty("catalina.base", base);
java.setWorkingDirectory(new File(getFileHandler().getAbsolutePath( getConfiguration().getHome())));
String base = getFileHandler().getAbsolutePath(getConfiguration().getHome()); java.setSystemProperty("catalina.home", getFileHandler().getAbsolutePath(getHome())); java.setSystemProperty("catalina.base", base);
String absolutePath = fileHandler.getAbsolutePath(path); if (deployable.getType() == DeployableType.WAR && fileHandler.exists(absolutePath))
String absolutePath = fileHandler.getAbsolutePath(path); if (deployable.getType() == DeployableType.WAR && fileHandler.exists(absolutePath))
String absolutePath = fileHandler.getAbsolutePath(deployable.getFile()); if (deployable.getType() == DeployableType.WAR && fileHandler.exists(absolutePath))
String absolutePath = fileHandler.getAbsolutePath(deployable.getFile()); if (deployable.getType() == DeployableType.WAR && fileHandler.exists(absolutePath))