diff --git a/platform/runtime/core/initializer/connection-initializer/src/main/java/ru/entaxy/esb/platform/runtime/core/initializer/connection/ConnectionInitializer.java b/platform/runtime/core/initializer/connection-initializer/src/main/java/ru/entaxy/esb/platform/runtime/core/initializer/connection/ConnectionInitializer.java index 1a7fc839..ed0408ce 100644 --- a/platform/runtime/core/initializer/connection-initializer/src/main/java/ru/entaxy/esb/platform/runtime/core/initializer/connection/ConnectionInitializer.java +++ b/platform/runtime/core/initializer/connection-initializer/src/main/java/ru/entaxy/esb/platform/runtime/core/initializer/connection/ConnectionInitializer.java @@ -204,7 +204,8 @@ public class ConnectionInitializer extends AbstractInitializer { .command("build") .set(EntaxyProducerService.INSTRUCTIONS.ARTIFACT.TIMESTAMP, newTimestamp) .command("install") - .set("update", ""); + .set("update", "") + .set("installLocal", true); String instructions = builder .getInstructionsString(); diff --git a/platform/runtime/core/object-producing/object-producer-core/src/main/java/ru/entaxy/platform/core/producer/executor/commands/Build.java b/platform/runtime/core/object-producing/object-producer-core/src/main/java/ru/entaxy/platform/core/producer/executor/commands/Build.java index 760d439c..e18245bd 100644 --- a/platform/runtime/core/object-producing/object-producer-core/src/main/java/ru/entaxy/platform/core/producer/executor/commands/Build.java +++ b/platform/runtime/core/object-producing/object-producer-core/src/main/java/ru/entaxy/platform/core/producer/executor/commands/Build.java @@ -21,6 +21,7 @@ package ru.entaxy.platform.core.producer.executor.commands; import java.util.Map; +import org.osgi.framework.Constants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -137,6 +138,13 @@ public class Build extends AbstractCommandExecutor { } } artifact.getProperties().putAll(g.getProperties()); + // TODO get value from manifest + // ArtifactManifest must be improved to provide read access to all attributes + if (!artifact.getProperties().containsKey(Constants.BUNDLE_SYMBOLICNAME)) { + artifact.getProperties().put(Constants.BUNDLE_SYMBOLICNAME + , artifact.getCoordinates().getGroupId() + + "." + artifact.getCoordinates().getArtifactId()); + } artifactList.add(artifact); printOutput("\n\t == " + artifact.getCoordinates().toString() + " ==\n"); printOutput(new String(artifact.asByteArray())); diff --git a/platform/runtime/core/object-producing/object-producer-core/src/main/java/ru/entaxy/platform/core/producer/executor/commands/Install.java b/platform/runtime/core/object-producing/object-producer-core/src/main/java/ru/entaxy/platform/core/producer/executor/commands/Install.java index edfd514e..3c204605 100644 --- a/platform/runtime/core/object-producing/object-producer-core/src/main/java/ru/entaxy/platform/core/producer/executor/commands/Install.java +++ b/platform/runtime/core/object-producing/object-producer-core/src/main/java/ru/entaxy/platform/core/producer/executor/commands/Install.java @@ -90,6 +90,8 @@ public class Install extends AbstractCommandExecutor { Installer installer = null; + String artifactUpdate = update; + printOutput("-> Installing artifact: [" + da.getArtifact().getCoordinates().toString() + "]"); if (installLocal) { LocalInstaller localInstaller = artifactService.installers().local() @@ -110,14 +112,14 @@ public class Install extends AbstractCommandExecutor { BlueprintInstaller blueprintInstaller = installer.typed(BlueprintInstaller.class); if (installOnlyIfMissing) blueprintInstaller.installOnlyIfMissing(); - if (update != null) { - if (!CommonUtils.isValid(update)) { - update = da + if (artifactUpdate != null) { + if (!CommonUtils.isValid(artifactUpdate)) { + artifactUpdate = da .getArtifact().getProperties() .getOrDefault(Constants.BUNDLE_SYMBOLICNAME, "") .toString(); } - blueprintInstaller.update(update); + blueprintInstaller.update(artifactUpdate); } result = blueprintInstaller.start().install(); } else {