felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject BND version makro
Date Wed, 08 Sep 2010 07:27:28 GMT
Hi all,

I started using the BND version makro in my bundles implementing
interfaces to ensure proper version range configuration. Thus I do
something like this in the configuration element for the bundle plugin:

   <Import-Package>
      the.api;version=[$(version;==;$(@)),$(version;=+;$(@)))
   </Import-Package>

Now, this works perfectly and the Import-Package header is created
correctly. Still I get stack dumps logged (see the end of the message)
during the build (not failing the build, though, but not nice).

Has anyone seent this, too ?
Shall I report an issue ?

Thanks and Regards
Felix

Here comes the dump:
[INFO] [bundle:bundle {execution: default-bundle}]
java.lang.reflect.InvocationTargetException
	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 aQute.lib.osgi.Macro.doCommand(Macro.java:183)
	at aQute.lib.osgi.Macro.doCommands(Macro.java:171)
	at aQute.lib.osgi.Macro.replace(Macro.java:118)
	at aQute.lib.osgi.Macro.process(Macro.java:62)
	at aQute.lib.osgi.Macro.process(Macro.java:78)
	at aQute.lib.osgi.Macro.process(Macro.java:48)
	at aQute.lib.osgi.Macro.process(Macro.java:43)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:609)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:387)
	at aQute.lib.osgi.Analyzer.getImportPackages(Analyzer.java:248)
	at aQute.lib.osgi.Builder.getImportPackages(Builder.java:149)
	at aQute.lib.osgi.Analyzer.analyze(Analyzer.java:146)
	at aQute.lib.osgi.Builder.analyze(Builder.java:198)
	at aQute.lib.osgi.Analyzer.calcManifest(Analyzer.java:283)
	at aQute.lib.osgi.Builder.build(Builder.java:78)
	at
org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:395)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:286)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:240)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:231)
	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)
Caused by: java.lang.IllegalArgumentException: Invalid syntax for
version: ${@}
	at aQute.libg.version.Version.<init>(Version.java:45)
	at aQute.lib.osgi.Macro._version(Macro.java:627)
	... 42 more
java.lang.reflect.InvocationTargetException
	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 aQute.lib.osgi.Macro.doCommand(Macro.java:183)
	at aQute.lib.osgi.Macro.doCommands(Macro.java:171)
	at aQute.lib.osgi.Macro.replace(Macro.java:118)
	at aQute.lib.osgi.Macro.process(Macro.java:62)
	at aQute.lib.osgi.Macro.process(Macro.java:78)
	at aQute.lib.osgi.Macro.process(Macro.java:48)
	at aQute.lib.osgi.Macro.process(Macro.java:43)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:609)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:387)
	at aQute.lib.osgi.Analyzer.getImportPackages(Analyzer.java:248)
	at aQute.lib.osgi.Builder.getImportPackages(Builder.java:149)
	at aQute.lib.osgi.Analyzer.analyze(Analyzer.java:146)
	at aQute.lib.osgi.Builder.analyze(Builder.java:198)
	at aQute.lib.osgi.Analyzer.calcManifest(Analyzer.java:283)
	at aQute.lib.osgi.Builder.build(Builder.java:78)
	at
org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:395)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:286)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:240)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:231)
	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)
Caused by: java.lang.IllegalArgumentException: Invalid syntax for
version: ${@}
	at aQute.libg.version.Version.<init>(Version.java:45)
	at aQute.lib.osgi.Macro._version(Macro.java:627)
	... 42 more
java.lang.reflect.InvocationTargetException
	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 aQute.lib.osgi.Macro.doCommand(Macro.java:183)
	at aQute.lib.osgi.Macro.doCommands(Macro.java:171)
	at aQute.lib.osgi.Macro.replace(Macro.java:118)
	at aQute.lib.osgi.Macro.process(Macro.java:62)
	at aQute.lib.osgi.Macro.process(Macro.java:78)
	at aQute.lib.osgi.Macro.process(Macro.java:48)
	at aQute.lib.osgi.Macro.process(Macro.java:43)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:609)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:387)
	at aQute.lib.osgi.Analyzer.getImportPackages(Analyzer.java:248)
	at aQute.lib.osgi.Builder.getImportPackages(Builder.java:149)
	at aQute.lib.osgi.Analyzer.analyze(Analyzer.java:146)
	at aQute.lib.osgi.Builder.analyze(Builder.java:198)
	at aQute.lib.osgi.Analyzer.calcManifest(Analyzer.java:283)
	at aQute.lib.osgi.Builder.build(Builder.java:78)
	at
org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:395)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:286)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:240)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:231)
	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)
Caused by: java.lang.IllegalArgumentException: Invalid syntax for
version: ${@}
	at aQute.libg.version.Version.<init>(Version.java:45)
	at aQute.lib.osgi.Macro._version(Macro.java:627)
	... 42 more
java.lang.reflect.InvocationTargetException
	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 aQute.lib.osgi.Macro.doCommand(Macro.java:183)
	at aQute.lib.osgi.Macro.doCommands(Macro.java:171)
	at aQute.lib.osgi.Macro.replace(Macro.java:118)
	at aQute.lib.osgi.Macro.process(Macro.java:62)
	at aQute.lib.osgi.Macro.process(Macro.java:78)
	at aQute.lib.osgi.Macro.process(Macro.java:48)
	at aQute.lib.osgi.Macro.process(Macro.java:43)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:609)
	at aQute.lib.osgi.Processor.getProperty(Processor.java:387)
	at aQute.lib.osgi.Analyzer.getImportPackages(Analyzer.java:248)
	at aQute.lib.osgi.Builder.getImportPackages(Builder.java:149)
	at aQute.lib.osgi.Analyzer.analyze(Analyzer.java:146)
	at aQute.lib.osgi.Builder.analyze(Builder.java:198)
	at aQute.lib.osgi.Analyzer.calcManifest(Analyzer.java:283)
	at aQute.lib.osgi.Builder.build(Builder.java:78)
	at
org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(BundlePlugin.java:395)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:286)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:240)
	at
org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:231)
	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)
Caused by: java.lang.IllegalArgumentException: Invalid syntax for
version: ${@}
	at aQute.libg.version.Version.<init>(Version.java:45)
	at aQute.lib.osgi.Macro._version(Macro.java:627)
	... 42 more
[WARNING] Warning building bundle
org.apache.felix:org.apache.felix.configadmin:bundle:1.2.7-SNAPSHOT : No
translation found for macro: @
[WARNING] Warning building bundle
org.apache.felix:org.apache.felix.configadmin:bundle:1.2.7-SNAPSHOT :
Exception in replace: java.lang.IllegalArgumentException: Invalid syntax
for version: ${@}
[WARNING] Warning building bundle
org.apache.felix:org.apache.felix.configadmin:bundle:1.2.7-SNAPSHOT : No
translation found for macro: version;==;${@}
[WARNING] Warning building bundle
org.apache.felix:org.apache.felix.configadmin:bundle:1.2.7-SNAPSHOT : No
translation found for macro: version;=+;${@}



Mime
View raw message