Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
maven-bundle-plugin-2.3.7
-
None
-
Windows 7, Maven 3.0.4
Description
maven-bundle-plugin will not scan blueprint xml files in the workspace during a Maven build, unless the blueprint file is located at OSGI-INF/blueprint/ and an instruction "Bundle-Blueprint: OSGI-INF/blueprint" is provided.
The bug is in org.apache.felix.bundleplugin.BlueprintPlugin and in method analyzeJar.
Original code:
String bpHeader = analyzer.getProperty( "Bundle-Blueprint", "OSGI-INF/blueprint" );
Map<String, Map<String, String>> map = Processor.parseHeader( bpHeader, null );
for ( String root : map.keySet() )
{
Jar jar = analyzer.getJar();
Map<String, Resource> dir = jar.getDirectories().get( root );
if ( dir == null || dir.isEmpty() )
This code reads a custom location from the Bundle-Blueprint instruction, locates the resource in the classpath and does the processing, but then just returns false.
Changing as follows fixes the problem:
if ( resource != null )
process( analyzer, root, resource, headers );
continue;