diff --git a/nuxeo-runtime-reload/pom.xml b/nuxeo-runtime-reload/pom.xml --- a/nuxeo-runtime-reload/pom.xml +++ b/nuxeo-runtime-reload/pom.xml @@ -22,6 +22,10 @@ org.nuxeo.runtime nuxeo-runtime + + org.nuxeo.runtime + nuxeo-runtime-deploy + org.osgi diff --git a/nuxeo-runtime-reload/src/main/java/org/nuxeo/runtime/reload/ReloadComponent.java b/nuxeo-runtime-reload/src/main/java/org/nuxeo/runtime/reload/ReloadComponent.java --- a/nuxeo-runtime-reload/src/main/java/org/nuxeo/runtime/reload/ReloadComponent.java +++ b/nuxeo-runtime-reload/src/main/java/org/nuxeo/runtime/reload/ReloadComponent.java @@ -24,10 +24,9 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuxeo.common.Environment; -import org.nuxeo.common.utils.FileUtils; -import org.nuxeo.common.utils.ZipUtils; import org.nuxeo.runtime.api.Framework; import org.nuxeo.runtime.api.SharedResourceLoader; +import org.nuxeo.runtime.deployment.preprocessor.DeploymentPreprocessor; import org.nuxeo.runtime.model.ComponentContext; import org.nuxeo.runtime.model.DefaultComponent; import org.nuxeo.runtime.services.event.Event; @@ -154,27 +153,8 @@ } public static void processFragment(File file) throws Exception { - log.info("running fragment processor"); - // we cannot use DeploymentPreprocessor since the initial preprocessing - // will be overridden - if (file.isDirectory()) { - File war = new File(file, "web"); - war = new File(war, "nuxeo.war"); - if (war.isDirectory()) { - FileUtils.copyTree(war, getAppDir()); - } else { - // compatibility mode with studio 1.5 - see NXP-6186 - war = new File(file, "nuxeo.war"); - if (war.isDirectory()) { - FileUtils.copyTree(war, getAppDir()); - } - } - } else if (file.isFile()) { // a jar - File war = getWarDir(); - ZipUtils.unzip("web/nuxeo.war", file, war); - // compatibility mode with studio 1.5 - see NXP-6186 - ZipUtils.unzip("nuxeo.war", file, war); - } + String path = Environment.getDefault().getHome().getAbsolutePath(); + DeploymentPreprocessor.main(new String[] { path }); } public static File getAppDir() { diff --git a/pom.xml b/pom.xml --- a/pom.xml +++ b/pom.xml @@ -64,6 +64,11 @@ org.nuxeo.runtime + nuxeo-runtime-reload + ${nuxeo.runtime.version} + + + org.nuxeo.runtime nuxeo-runtime-osgi ${nuxeo.runtime.version}