/** * @return true if {@link #getTomcatConfig()} file already exists */ @Override protected boolean isConfigured() { return new File(generator.getNuxeoHome(), getTomcatConfig()).exists(); }
@Override public void prepareWizardStart() { try { // remove Tomcat configuration of Nuxeo context File contextXML = new File(generator.getNuxeoHome(), getTomcatConfig()); contextXML.delete(); // deploy wizard WAR File wizardWAR = new File(generator.getNuxeoHome(), "templates" + File.separator + "nuxeo-wizard.war"); File nuxeoWAR = new File(generator.getNuxeoHome(), "webapps" + File.separator + getContextName() + ".war"); nuxeoWAR.delete(); FileUtils.copyFile(wizardWAR, nuxeoWAR); } catch (IOException e) { log.error("Could not change Tomcat configuration to run wizard instead of Nuxeo.", e); } }
@Override public void checkPaths() throws ConfigurationException { super.checkPaths(); File oldPath = new File(getRuntimeHome(), "data" + File.separator + "vcsh2repo"); String message = String.format("NXP-5370, NXP-5460. " + "Please rename 'vcsh2repo' directory from %s to %s", oldPath, new File(generator.getDataDir(), "h2" + File.separator + "nuxeo")); checkPath(oldPath, message); oldPath = new File(getRuntimeHome(), "data" + File.separator + "derby" + File.separator + "nxsqldirectory"); message = "NXP-5370, NXP-5460. " + "It is not possible to migrate Derby data." + System.getProperty("line.separator") + "Please remove 'nx*' directories from " + oldPath.getParent() + System.getProperty("line.separator") + "or edit templates/default/" + getTomcatConfig() + System.getProperty("line.separator") + "following https://github.com/nuxeo/nuxeo-distribution/blob/release-5.3.2/nuxeo-distribution-resources/src/main/resources/templates-tomcat/default/conf/Catalina/localhost/nuxeo.xml"; checkPath(oldPath, message); }