You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Rigas Grigoropoulos (JIRA)" <ji...@apache.org> on 2012/11/21 11:17:58 UTC

[jira] [Created] (FELIX-3772) maven-bundle-plugin does not scan blueprint in workspace outside default location

Rigas Grigoropoulos created FELIX-3772:
------------------------------------------

             Summary: 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

[jira] [Commented] (FELIX-3772) maven-bundle-plugin does not scan blueprint in workspace outside default location

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Resolved] (FELIX-3772) maven-bundle-plugin does not scan blueprint in workspace outside default location

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch resolved FELIX-3772.
-------------------------------------

    Resolution: Fixed

Fixed in r1412405 please test latest 2.4.0-SNAPSHOT from https://repository.apache.org/content/groups/snapshots/ or build plugin locally
                
> 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