Hi Jamie,
this is a quick fix to get the instance commands working again. I wonder
why I did not see the test failure. Will investigate this tomorrow.
The reason why I added the ssh feature is that the feature config we
copy from the assembly only contains the config feature but we need ssh
as this is how
we detect if an instance is running.
The more general question is what we want to use as a base for new
instances. Should it be the karaf minimal distro, should it be the karaf
standard distro or the
currently installed karaf? I am also not sure what the best solution is
so I did the minimal change that makes the instance commands work again.
Another possible problem is the maven repos config. Currently we copy
this from the assembly at build time. So if the user adds his company
repo to the root instance we will not have it
in child instances by default.
Any ideas how we should solve this? It thought about a dir with a kind
of template for child instances but I am not sure about it. We could
also have the best practice of adding a child instance,
configuring it by hand and then clone it for further children.
Christian
Am 15.05.2012 19:52, schrieb Jamie G.:
I'm not sure on this check in.
When I build trunk I get:
Failed tests:
testHandleFeatures(org.apache.karaf.instance.core.internal.InstanceServiceImplTest):
expected:<abc,def,test> but was:<abc,def,ssh,test>
Which can be resolved by updating
trunk/instance/core/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
to include ssh in the expects assertion.
- assertEquals("abc,def,test", p2.get("featuresBoot"));
+ assertEquals("abc,def,ssh,test", p2.get("featuresBoot"));
That being said, is there a special reason for using
Collections.singletonList to add ssh? What if we want to add more to
the list down the road?
-Jamie
On Tue, May 15, 2012 at 9:06 AM,<[email protected]> wrote:
Author: cschneider
Date: Tue May 15 11:36:19 2012
New Revision: 1338657
URL: http://svn.apache.org/viewvc?rev=1338657&view=rev
Log:
KARAF-1206 Adding ssh feature so the instance starts correctly again
Modified:
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
Modified:
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
URL:
http://svn.apache.org/viewvc/karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java?rev=1338657&r1=1338656&r2=1338657&view=diff
==============================================================================
---
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
(original)
+++
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
Tue May 15 11:36:19 2012
@@ -23,6 +23,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -233,7 +234,7 @@ public class InstanceServiceImpl impleme
void addFeaturesFromSettings(File featuresCfg, InstanceSettings settings)
throws IOException {
Properties p = loadStorage(featuresCfg);
-
+ appendToPropList(p, "featuresBoot", Collections.singletonList("ssh"));
appendToPropList(p, "featuresBoot", settings.getFeatures());
appendToPropList(p, "featuresRepositories", settings.getFeatureURLs());
saveStorage(p, featuresCfg, "Features Configuration");
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com