Author: mcculls
Date: Mon Oct 22 19:37:47 2007
New Revision: 587367

URL: http://svn.apache.org/viewvc?rev=587367&view=rev
Log:
FELIX 406: fix Windows path entries in Bundle-ClassPath when embedding jars

Modified:
    
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java

Modified: 
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java?rev=587367&r1=587366&r2=587367&view=diff
==============================================================================
--- 
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
 (original)
+++ 
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
 Mon Oct 22 19:37:47 2007
@@ -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);


Reply via email to