You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by an...@apache.org on 2014/09/09 21:53:31 UTC
git commit: [KARAF-3212] - karaf.data variable not correctly resolved
while installing the pax-http feature
Repository: karaf
Updated Branches:
refs/heads/karaf-3.0.x 83e488949 -> 8de93b095
[KARAF-3212] - karaf.data variable not correctly resolved while
installing the pax-http feature
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/8de93b09
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/8de93b09
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/8de93b09
Branch: refs/heads/karaf-3.0.x
Commit: 8de93b095fa16cbf78ccacb0b8ce7a8998f1c70c
Parents: 83e4889
Author: anierbeck <bc...@googlemail.com>
Authored: Tue Sep 9 21:53:06 2014 +0200
Committer: anierbeck <bc...@googlemail.com>
Committed: Tue Sep 9 21:53:06 2014 +0200
----------------------------------------------------------------------
.../karaf/features/internal/model/Config.java | 1 +
.../org/apache/karaf/features/AppendTest.java | 49 ++++++++++++++++++++
.../org/apache/karaf/features/internal/f07.xml | 28 +++++++++++
.../webconsole/features/ExtendedFeature.java | 1 -
4 files changed, 78 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/8de93b09/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java
index 67019be..395a9e3 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java
@@ -140,6 +140,7 @@ public class Config implements ConfigInfo{
} catch (IOException e) {
// ignore??
}
+ interpolation(props);
return props;
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8de93b09/features/core/src/test/java/org/apache/karaf/features/AppendTest.java
----------------------------------------------------------------------
diff --git a/features/core/src/test/java/org/apache/karaf/features/AppendTest.java b/features/core/src/test/java/org/apache/karaf/features/AppendTest.java
new file mode 100644
index 0000000..af64437
--- /dev/null
+++ b/features/core/src/test/java/org/apache/karaf/features/AppendTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.karaf.features;
+
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+import org.apache.karaf.features.internal.RepositoryImpl;
+
+
+public class AppendTest extends TestCase {
+
+ public void testLoad() throws Exception {
+ System.setProperty("karaf.data", "data");
+
+ RepositoryImpl r = new RepositoryImpl(getClass().getResource("internal/f07.xml").toURI());
+ // Check repo
+ Feature[] features = r.getFeatures();
+ assertNotNull(features);
+ assertEquals(1, features.length);
+ Feature feature = features[0];
+
+ ConfigInfo configInfo = feature.getConfigurations().get(0);
+ assertNotNull(configInfo);
+ assertTrue(configInfo.isAppend());
+
+ Properties properties = configInfo.getProperties();
+ assertNotNull(properties);
+ String property = properties.getProperty("javax.servlet.context.tempdir");
+ assertNotNull(property);
+ assertFalse(property.contains("${"));
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8de93b09/features/core/src/test/resources/org/apache/karaf/features/internal/f07.xml
----------------------------------------------------------------------
diff --git a/features/core/src/test/resources/org/apache/karaf/features/internal/f07.xml b/features/core/src/test/resources/org/apache/karaf/features/internal/f07.xml
new file mode 100644
index 0000000..802ce1e
--- /dev/null
+++ b/features/core/src/test/resources/org/apache/karaf/features/internal/f07.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<features name="karaf" xmlns="http://karaf.apache.org/xmlns/features/v1.2.1">
+ <feature name="http" version="2.0.0" >
+ <feature version="[${pax.web.version},5)">pax-http</feature>
+ <config name="org.ops4j.pax.web" append="true">
+ javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
+ </config>
+ <bundle start-level="30">mvn:org.apache.karaf.http/org.apache.karaf.http.core/${project.version}</bundle>
+ <bundle start-level="30">mvn:org.apache.karaf.http/org.apache.karaf.http.command/${project.version}</bundle>
+ </feature>
+</features>
+
http://git-wip-us.apache.org/repos/asf/karaf/blob/8de93b09/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java
----------------------------------------------------------------------
diff --git a/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java b/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java
index b726b28..7f75a3b 100644
--- a/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java
+++ b/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java
@@ -56,7 +56,6 @@ public class ExtendedFeature implements Feature {
@Override
public List<ConfigInfo> getConfigurations() {
-// public Map<String, Map<String, String>> getConfigurations() {
return this.feature.getConfigurations();
}