Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3772

maven-bundle-plugin does not scan blueprint in workspace outside default location

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • maven-bundle-plugin-2.3.7
    • maven-bundle-plugin-2.4.0
    • Maven Bundle Plugin
    • 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() )

      { 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;

      Attachments

        Activity

          People

            Unassigned Unassigned
            rigas.grigoropoulos Rigas Grigoropoulos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: