You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2015/03/19 16:48:49 UTC

[1/2] karaf git commit: [KARAF-3388] Fix jaas-blueprint-jasypt tests

Repository: karaf
Updated Branches:
  refs/heads/master 824d78497 -> ceba72dcd


[KARAF-3388] Fix jaas-blueprint-jasypt tests


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/edbd1903
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/edbd1903
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/edbd1903

Branch: refs/heads/master
Commit: edbd1903c0a053b0208d62935b4bb2b3280b3b3a
Parents: 824d784
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Thu Nov 27 14:43:09 2014 +0100
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Thu Mar 19 13:32:37 2015 +0100

----------------------------------------------------------------------
 jaas/blueprint/jasypt/pom.xml                   | 22 +++++++++---
 ...tableConfigAdminPropertyPlaceholderTest.java | 14 ++++----
 .../EncryptablePropertyPlaceholderTest.java     | 21 +++++-------
 .../blueprint/jasypt/handler/beans/Bean.java    | 35 ++++++++++++++++++++
 .../src/test/resources/karaf/etc/README.txt     | 16 +++++++++
 .../jaas/blueprint/jasypt/handler/test.xml      |  2 +-
 6 files changed, 86 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/edbd1903/jaas/blueprint/jasypt/pom.xml
----------------------------------------------------------------------
diff --git a/jaas/blueprint/jasypt/pom.xml b/jaas/blueprint/jasypt/pom.xml
index a6463c2..1dadac6 100644
--- a/jaas/blueprint/jasypt/pom.xml
+++ b/jaas/blueprint/jasypt/pom.xml
@@ -69,7 +69,6 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
-            <version>4.2.0</version>
             <scope>test</scope>
         </dependency>
 
@@ -80,9 +79,9 @@
         </dependency>
 
         <dependency>
-            <groupId>com.googlecode.pojosr</groupId>
-            <artifactId>de.kalpatec.pojosr.framework</artifactId>
-            <version>0.1.6</version>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.connect</artifactId>
+            <version>0.1.0-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
 
@@ -99,6 +98,13 @@
         </dependency>
 
         <dependency>
+            <groupId>org.ow2.asm</groupId>
+            <artifactId>asm-debug-all</artifactId>
+            <version>5.0.3</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
             <version>${slf4j.version}</version>
@@ -146,6 +152,14 @@
                     </instructions>
                 </configuration>
             </plugin>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <systemProperties>
+                        <karaf.etc>${project.build.testOutputDirectory}/karaf/etc</karaf.etc>
+                    </systemProperties>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/edbd1903/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
----------------------------------------------------------------------
diff --git a/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java b/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
index ff6cb79..4fe818a 100644
--- a/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
+++ b/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptableConfigAdminPropertyPlaceholderTest.java
@@ -14,12 +14,12 @@
  */
 package org.apache.karaf.jaas.blueprint.jasypt.handler;
 
-import de.kalpatec.pojosr.framework.PojoServiceRegistryFactoryImpl;
-import de.kalpatec.pojosr.framework.launch.BundleDescriptor;
-import de.kalpatec.pojosr.framework.launch.ClasspathScanner;
-import de.kalpatec.pojosr.framework.launch.PojoServiceRegistry;
-import de.kalpatec.pojosr.framework.launch.PojoServiceRegistryFactory;
 import junit.framework.TestCase;
+import org.apache.felix.connect.PojoServiceRegistryFactoryImpl;
+import org.apache.felix.connect.launch.BundleDescriptor;
+import org.apache.felix.connect.launch.ClasspathScanner;
+import org.apache.felix.connect.launch.PojoServiceRegistry;
+import org.apache.felix.connect.launch.PojoServiceRegistryFactory;
 import org.apache.karaf.util.StreamUtils;
 import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
 import org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig;
@@ -72,7 +72,7 @@ public class EncryptableConfigAdminPropertyPlaceholderTest extends TestCase {
                         .set("Bundle-Version", "0.0.0")));
         bundles.add(getBundleDescriptor(
                 "target/test2.jar",
-                bundle().add("OSGI-INF/blueprint/config-adminTest.xml", getClass().getResource("config-adminTest.xml"))
+                bundle().add("OSGI-INF/blueprint/configadmin-test.xml", getClass().getResource("configadmin-test.xml"))
                         .set("Manifest-Version", "2")
                         .set("Bundle-ManifestVersion", "2")
                         .set("Bundle-SymbolicName", "configtest")
@@ -96,7 +96,7 @@ public class EncryptableConfigAdminPropertyPlaceholderTest extends TestCase {
         }
         return new BundleDescriptor(
                 getClass().getClassLoader(),
-                new URL("jar:" + file.toURI().toString() + "!/"),
+                "jar:" + file.toURI().toString() + "!/",
                 headers);
     }
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/edbd1903/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptablePropertyPlaceholderTest.java
----------------------------------------------------------------------
diff --git a/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptablePropertyPlaceholderTest.java b/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptablePropertyPlaceholderTest.java
index 94d6c82..7f2074a 100644
--- a/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptablePropertyPlaceholderTest.java
+++ b/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/EncryptablePropertyPlaceholderTest.java
@@ -17,10 +17,6 @@ package org.apache.karaf.jaas.blueprint.jasypt.handler;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
 import java.util.Collection;
 import java.util.Dictionary;
 import java.util.Enumeration;
@@ -30,12 +26,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.jar.JarInputStream;
 
-import de.kalpatec.pojosr.framework.PojoServiceRegistryFactoryImpl;
-import de.kalpatec.pojosr.framework.launch.BundleDescriptor;
-import de.kalpatec.pojosr.framework.launch.ClasspathScanner;
-import de.kalpatec.pojosr.framework.launch.PojoServiceRegistry;
-import de.kalpatec.pojosr.framework.launch.PojoServiceRegistryFactory;
 import junit.framework.TestCase;
+import org.apache.felix.connect.PojoServiceRegistryFactoryImpl;
+import org.apache.felix.connect.launch.BundleDescriptor;
+import org.apache.felix.connect.launch.ClasspathScanner;
+import org.apache.felix.connect.launch.PojoServiceRegistry;
+import org.apache.felix.connect.launch.PojoServiceRegistryFactory;
+import org.apache.karaf.jaas.blueprint.jasypt.handler.beans.Bean;
 import org.apache.karaf.util.StreamUtils;
 import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
 import org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig;
@@ -108,7 +105,7 @@ public class EncryptablePropertyPlaceholderTest extends TestCase {
         }
         return new BundleDescriptor(
                 getClass().getClassLoader(),
-                new URL("jar:" + file.toURI().toString() + "!/"),
+                "jar:" + file.toURI().toString() + "!/",
                 headers);
     }
 
@@ -124,8 +121,8 @@ public class EncryptablePropertyPlaceholderTest extends TestCase {
             System.out.println(bundle.getSymbolicName() + " / " + bundle.getVersion());
         }
 
-        String encoded = getOsgiService(String.class, "(encoded=*)");
-        assertEquals("bar", encoded);
+        Bean encoded = getOsgiService(Bean.class, "(encoded=*)");
+        assertEquals("bar", encoded.getString());
     }
 
 

http://git-wip-us.apache.org/repos/asf/karaf/blob/edbd1903/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/beans/Bean.java
----------------------------------------------------------------------
diff --git a/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/beans/Bean.java b/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/beans/Bean.java
new file mode 100644
index 0000000..8249a66
--- /dev/null
+++ b/jaas/blueprint/jasypt/src/test/java/org/apache/karaf/jaas/blueprint/jasypt/handler/beans/Bean.java
@@ -0,0 +1,35 @@
+/*
+ *  Licensed 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.
+ *  under the License.
+ */
+package org.apache.karaf.jaas.blueprint.jasypt.handler.beans;
+
+public class Bean {
+
+    private String string;
+
+    public Bean() {
+    }
+
+    public Bean(String string) {
+        this.string = string;
+    }
+
+    public String getString() {
+        return string;
+    }
+
+    public void setString(String string) {
+        this.string = string;
+    }
+}

http://git-wip-us.apache.org/repos/asf/karaf/blob/edbd1903/jaas/blueprint/jasypt/src/test/resources/karaf/etc/README.txt
----------------------------------------------------------------------
diff --git a/jaas/blueprint/jasypt/src/test/resources/karaf/etc/README.txt b/jaas/blueprint/jasypt/src/test/resources/karaf/etc/README.txt
new file mode 100644
index 0000000..45f1329
--- /dev/null
+++ b/jaas/blueprint/jasypt/src/test/resources/karaf/etc/README.txt
@@ -0,0 +1,16 @@
+/*
+ *  Licensed 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.
+ *  under the License.
+ */
+
+Keep AutoEncryptionSupport happy about the existing directory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf/blob/edbd1903/jaas/blueprint/jasypt/src/test/resources/org/apache/karaf/jaas/blueprint/jasypt/handler/test.xml
----------------------------------------------------------------------
diff --git a/jaas/blueprint/jasypt/src/test/resources/org/apache/karaf/jaas/blueprint/jasypt/handler/test.xml b/jaas/blueprint/jasypt/src/test/resources/org/apache/karaf/jaas/blueprint/jasypt/handler/test.xml
index c3a2aff..d2240c2 100644
--- a/jaas/blueprint/jasypt/src/test/resources/org/apache/karaf/jaas/blueprint/jasypt/handler/test.xml
+++ b/jaas/blueprint/jasypt/src/test/resources/org/apache/karaf/jaas/blueprint/jasypt/handler/test.xml
@@ -37,7 +37,7 @@
         <service-properties>
             <entry key="encoded" value="ENC(${foo})" />
         </service-properties>
-        <bean class="java.lang.String">
+        <bean class="org.apache.karaf.jaas.blueprint.jasypt.handler.beans.Bean">
             <argument value="ENC(${foo})" />
         </bean>
     </service>


[2/2] karaf git commit: [KARAF-3604] Upgrade to felix framework 4.9.0-SNAPSHOT

Posted by gn...@apache.org.
[KARAF-3604] Upgrade to felix framework 4.9.0-SNAPSHOT

Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/ceba72dc
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/ceba72dc
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/ceba72dc

Branch: refs/heads/master
Commit: ceba72dcd94deca5515f7f2b350403037447096f
Parents: edbd190
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Thu Mar 19 16:25:53 2015 +0100
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Thu Mar 19 16:25:53 2015 +0100

----------------------------------------------------------------------
 features/core/pom.xml | 1 +
 pom.xml               | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/ceba72dc/features/core/pom.xml
----------------------------------------------------------------------
diff --git a/features/core/pom.xml b/features/core/pom.xml
index 0c4fce7..e55eef4 100644
--- a/features/core/pom.xml
+++ b/features/core/pom.xml
@@ -142,6 +142,7 @@
                         <Private-Package>
                             org.apache.karaf.features.internal.*,
                             org.apache.felix.resolver,
+                            org.apache.felix.resolver.util,
                             org.apache.felix.utils.collections,
                             org.apache.felix.utils.version,
                             org.apache.felix.utils.properties,

http://git-wip-us.apache.org/repos/asf/karaf/blob/ceba72dc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a5ac165..a2247f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -164,7 +164,7 @@
         <felix.bundlerepository.version>2.0.4</felix.bundlerepository.version>
         <felix.configadmin.version>1.8.2</felix.configadmin.version>
         <felix.fileinstall.version>3.5.0</felix.fileinstall.version>
-        <felix.framework.version>4.6.1</felix.framework.version>
+        <felix.framework.version>4.9.0-SNAPSHOT</felix.framework.version>
         <felix.framework.security.version>2.4.0</felix.framework.security.version>
         <felix.gogo.version>0.16.2</felix.gogo.version>
         <felix.plugin.version>2.5.4-SNAPSHOT</felix.plugin.version>
@@ -178,7 +178,7 @@
         <felix.scr.version>1.8.2</felix.scr.version>
         <felix.scr.webconsole.plugin.version>1.0.0</felix.scr.webconsole.plugin.version>
         <felix.scr.annotation.version>1.6.0</felix.scr.annotation.version>
-        <felix.resolver.version>1.0.0</felix.resolver.version>
+        <felix.resolver.version>1.1.0-SNAPSHOT</felix.resolver.version>
 
         <aries.application.version>1.0.0</aries.application.version>
         <aries.application.api.version>1.0.0</aries.application.api.version>