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")
|
.command("build")
|
||||||
.set(EntaxyProducerService.INSTRUCTIONS.ARTIFACT.TIMESTAMP, newTimestamp)
|
.set(EntaxyProducerService.INSTRUCTIONS.ARTIFACT.TIMESTAMP, newTimestamp)
|
||||||
.command("install")
|
.command("install")
|
||||||
.set("update", "");
|
.set("update", "")
|
||||||
|
.set("installLocal", true);
|
||||||
|
|
||||||
String instructions = builder
|
String instructions = builder
|
||||||
.getInstructionsString();
|
.getInstructionsString();
|
||||||
|
@ -21,6 +21,7 @@ package ru.entaxy.platform.core.producer.executor.commands;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.osgi.framework.Constants;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -137,6 +138,13 @@ public class Build extends AbstractCommandExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
artifact.getProperties().putAll(g.getProperties());
|
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);
|
artifactList.add(artifact);
|
||||||
printOutput("\n\t == " + artifact.getCoordinates().toString() + " ==\n");
|
printOutput("\n\t == " + artifact.getCoordinates().toString() + " ==\n");
|
||||||
printOutput(new String(artifact.asByteArray()));
|
printOutput(new String(artifact.asByteArray()));
|
||||||
|
@ -90,6 +90,8 @@ public class Install extends AbstractCommandExecutor {
|
|||||||
|
|
||||||
Installer<?> installer = null;
|
Installer<?> installer = null;
|
||||||
|
|
||||||
|
String artifactUpdate = update;
|
||||||
|
|
||||||
printOutput("-> Installing artifact: [" + da.getArtifact().getCoordinates().toString() + "]");
|
printOutput("-> Installing artifact: [" + da.getArtifact().getCoordinates().toString() + "]");
|
||||||
if (installLocal) {
|
if (installLocal) {
|
||||||
LocalInstaller localInstaller = artifactService.installers().local()
|
LocalInstaller localInstaller = artifactService.installers().local()
|
||||||
@ -110,14 +112,14 @@ public class Install extends AbstractCommandExecutor {
|
|||||||
BlueprintInstaller blueprintInstaller = installer.typed(BlueprintInstaller.class);
|
BlueprintInstaller blueprintInstaller = installer.typed(BlueprintInstaller.class);
|
||||||
if (installOnlyIfMissing)
|
if (installOnlyIfMissing)
|
||||||
blueprintInstaller.installOnlyIfMissing();
|
blueprintInstaller.installOnlyIfMissing();
|
||||||
if (update != null) {
|
if (artifactUpdate != null) {
|
||||||
if (!CommonUtils.isValid(update)) {
|
if (!CommonUtils.isValid(artifactUpdate)) {
|
||||||
update = da
|
artifactUpdate = da
|
||||||
.getArtifact().getProperties()
|
.getArtifact().getProperties()
|
||||||
.getOrDefault(Constants.BUNDLE_SYMBOLICNAME, "")
|
.getOrDefault(Constants.BUNDLE_SYMBOLICNAME, "")
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
blueprintInstaller.update(update);
|
blueprintInstaller.update(artifactUpdate);
|
||||||
}
|
}
|
||||||
result = blueprintInstaller.start().install();
|
result = blueprintInstaller.start().install();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user