ENTAXY-374 fix file connection
This commit is contained in:
parent
f495628c75
commit
a0d3fb9633
@ -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();
|
||||
|
@ -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()));
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user