FELIX 406: fix Windows path entries in Bundle-ClassPath when embedding jars

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@587367 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
index 99158dc..cc71bba 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
@@ -327,8 +327,16 @@
                 targetFile = new File(embedDirectory, sourceFile.getName());
             }
 
-            bundleClassPath += targetFile;
-            includeResource += targetFile + "=" + sourceFile;
+            String targetFilePath = targetFile.getPath();
+
+            // replace windows backslash with a slash
+            if ( File.separatorChar != '/' )
+            {
+                targetFilePath = targetFilePath.replace(File.separatorChar, '/');
+            }
+
+            bundleClassPath += targetFilePath;
+            includeResource += targetFilePath + "=" + sourceFile;
 
             properties.setProperty(Analyzer.BUNDLE_CLASSPATH, bundleClassPath);
             properties.setProperty(Analyzer.INCLUDE_RESOURCE, includeResource);