Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
maven-bundle-plugin-2.0.1
Description
According to the OSGI 4.2 compendium specification it is allowed to use wildcards for the Service-Component manifest entry:
> XML documents containing component descriptions must be specified by the Service-Component header in the manifest. The value of the header is a comma separated list of paths to > XML entries within the bundle.
> Service-Component ::= header // 3.2.4
> The Service-Component header has no architected directives or properties.
> The last component of each path in the Service-Component header may use wildcards so that Bundle.findEntries can be used to locate the XML docu- ment within the bundle and its fragments. For example:
> Service-Component: OSGI-INF/*.xml
If I try to configure maven-bundle-plugin with the following settings:
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>2.0.1</version>
<configuration>
<instructions>
<Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
<Private-Package>${pom.groupId}.${pom.artifactId}.*</Private-Package>
<Service-Component>OSGI-INF/*.xml</Service-Component>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
I get the following Exception during execution:
Bad Service-Component header: OSGI-INF/.xml, no such file OSGI-INF/.xml
java.lang.NullPointerException
at java.util.zip.ZipFile.getInputStream(ZipFile.java:180)
at org.osgi.impl.bundle.obr.resource.BundleInfo.doDeclarativeServices(BundleInfo.java:194)
at org.osgi.impl.bundle.obr.resource.BundleInfo.build(BundleInfo.java:95)
at org.apache.felix.obrplugin.ExtractBindexInfo.<init>(ExtractBindexInfo.java:86)
at org.apache.felix.obrplugin.ObrUpdate.updateRepository(ObrUpdate.java:223)
at org.apache.felix.obrplugin.ObrInstall.updateLocalBundleMetadata(ObrInstall.java:183)
at org.apache.felix.obrplugin.ObrInstall.execute(ObrInstall.java:142)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
org.apache.maven.plugin.MojoExecutionException: Exception
at org.apache.felix.obrplugin.ExtractBindexInfo.<init>(ExtractBindexInfo.java:91)
at org.apache.felix.obrplugin.ObrUpdate.updateRepository(ObrUpdate.java:223)
at org.apache.felix.obrplugin.ObrInstall.updateLocalBundleMetadata(ObrInstall.java:183)
at org.apache.felix.obrplugin.ObrInstall.execute(ObrInstall.java:142)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
[ERROR] unable to build Bindex informations
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
[WARNING] Exception while updating local OBR: BindexException
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
org.apache.maven.plugin.MojoExecutionException: BindexException
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
at org.apache.felix.obrplugin.ObrUpdate.updateRepository(ObrUpdate.java:230)
at org.apache.felix.obrplugin.ObrInstall.updateLocalBundleMetadata(ObrInstall.java:183)
at org.apache.felix.obrplugin.ObrInstall.execute(ObrInstall.java:142)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)