renatoathaydes / osgi-run

Osgi-Run - A Gradle plugin to make the development of modular applications using OSGi completely painless
Apache License 2.0
54 stars 13 forks source link

Don't remove Wrap Instruction after match #53

Closed fabianmeyer closed 7 years ago

fabianmeyer commented 7 years ago

When the manifest of a "wrapInstruction" matches a file pattern, the instruction is removed from the config:

BndWrapper.groovy

  Map<String, Object[]> config = getWrapConfig( wrapInstructions, jarFile )
        def consumeValue = { String key ->
            Object[] items = config.remove( key )
            if ( items ) items.join( ',' )
            else null
        }

Hence, the instruction is not applied to subsequent jar files, matching the pattern. E.g.

runOsgi {
  bundles += subprojects

  wrapInstructions {
      manifest( ~/.*/ ) {
          instruction 'Import-Package', '!org.scalatest*', '!org.scalacheck*', '!org.specs*','*'
      }
  }
}

is only applied to the first match.

renatoathaydes commented 7 years ago

Fixed in 1.5.2.

fabianmeyer commented 7 years ago

Sorry, I was quite busy in the last days. Thanks for fixing it!