use of io.quarkus.deployment.dev.DevModeContext.ModuleInfo in project quarkus by quarkusio.
the class IDEDevModeMain method accept.
@Override
public void accept(CuratedApplication curatedApplication, Map<String, Object> stringObjectMap) {
Path appClasses = (Path) stringObjectMap.get("app-classes");
DevModeContext devModeContext = new DevModeContext();
devModeContext.setArgs((String[]) stringObjectMap.get("args"));
ApplicationModel appModel = null;
try {
if (BuildToolHelper.isMavenProject(appClasses)) {
appModel = curatedApplication.getApplicationModel();
} else {
appModel = BootstrapUtils.deserializeQuarkusModel((Path) stringObjectMap.get(BootstrapConstants.SERIALIZED_APP_MODEL));
}
if (appModel != null) {
for (ResolvedDependency project : DependenciesFilter.getReloadableModules(appModel)) {
final ModuleInfo module = toModule(project);
if (project.getKey().equals(appModel.getAppArtifact().getKey()) && project.getVersion().equals(appModel.getAppArtifact().getVersion())) {
devModeContext.setApplicationRoot(module);
} else {
devModeContext.getAdditionalModules().add(module);
devModeContext.getLocalArtifacts().add(project.getKey());
}
}
}
} catch (AppModelResolverException e) {
log.error("Failed to load workspace, hot reload will not be available", e);
}
terminateIfRunning();
delegate = new IsolatedDevModeMain();
Map<String, Object> params = new HashMap<>();
params.put(DevModeContext.class.getName(), devModeContext);
params.put(DevModeType.class.getName(), DevModeType.LOCAL);
delegate.accept(curatedApplication, params);
}
Aggregations