felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1363123 - /felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BlueprintPlugin.java
Date Wed, 18 Jul 2012 21:24:06 GMT
Author: gnodet
Date: Wed Jul 18 21:24:06 2012
New Revision: 1363123

URL: http://svn.apache.org/viewvc?rev=1363123&view=rev
Log:
[FELIX-3602] The bundle plugin should generate the blueprint header with the file locations

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

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BlueprintPlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BlueprintPlugin.java?rev=1363123&r1=1363122&r2=1363123&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BlueprintPlugin.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BlueprintPlugin.java
Wed Jul 18 21:24:06 2012
@@ -76,6 +76,7 @@ public class BlueprintPlugin implements 
 
         String bpHeader = analyzer.getProperty( "Bundle-Blueprint", "OSGI-INF/blueprint"
);
         Map<String, ? extends Map<String, String>> map = Processor.parseHeader(
bpHeader, null );
+		bpHeader = "";
         for ( String root : map.keySet() )
         {
             Jar jar = analyzer.getJar();
@@ -83,19 +84,34 @@ public class BlueprintPlugin implements 
             if ( dir == null || dir.isEmpty() )
             {
                 Resource resource = jar.getResource( root );
-                if ( resource != null )
+                if ( resource != null ) 
+				{
                     process( analyzer, root, resource, headers );
+					if (bpHeader.length() > 0) {
+						bpHeader += ",";
+					}
+					bpHeader += root;
+				}
                 return false;
             }
             for ( Map.Entry<String, Resource> entry : dir.entrySet() )
             {
                 String path = entry.getKey();
                 Resource resource = entry.getValue();
-                if ( PATHS.matcher( path ).matches() )
+                if ( PATHS.matcher( path ).matches() ) 
+				{
                     process( analyzer, path, resource, headers );
+					if (bpHeader.length() > 0) {
+						bpHeader += ",";
+					}
+					bpHeader += path;
+				}
             }
-
         }
+		if( !map.isEmpty() ) 
+		{
+			analyzer.setProperty("Bundle-Blueprint", bpHeader);
+		}
 
         // Group and analyze
         Map<String, Set<Attribute>> hdrs = Create.map();



Mime
View raw message