[ 
https://issues.apache.org/jira/browse/FELIX-3772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502507#comment-13502507
 ] 

Stuart McCulloch commented on FELIX-3772:
-----------------------------------------

May also be related to FELIX-3602 (fixed in trunk and deployed in latest 
2.4.0-SNAPSHOT)
                
> maven-bundle-plugin does not scan blueprint in workspace outside default 
> location
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-3772
>                 URL: https://issues.apache.org/jira/browse/FELIX-3772
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>         Environment: Windows 7, Maven 3.0.4
>            Reporter: Rigas Grigoropoulos
>            Priority: Minor
>
> 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() )
>             {
>                 Resource resource = jar.getResource( root );
>                 if ( resource != null )
>                     process( analyzer, root, resource, headers );
>                 return false;
>             }
> 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;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to