>-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stuart >McCulloch >Sent: sexta-feira, 21 de Setembro de 2007 9:29 >To: [email protected] >Subject: Re: [Doubt] maven bundle plugin
>On 21/09/2007, José Pacheco <[EMAIL PROTECTED]> wrote: >> >> The problem is that I want to use an Activator from a project dependency, >> and when I package the project the maven-bundle-plugin tries to find the >> activator in the classpath of the bundle and it isn't there. This >> dependency >> will be available in the OSGI environment at runtime, and therefore not >> packaged with the bundle. >yes, "runtime" scope dependencies are not in the classpath used to generate >the bundle, as they are not considered part of the Maven compilation >classpath. >if you expect this dependency to be available in the OSGi environment then >you >should really mark it with "provided" scope, which is included in the >classpath. Maven bundle plugin still asking for the activator in the class path, the "provided" scope seems to not have resolved the problem. The error is: [ERROR] Error building bundle com.criticalsoftware.example:example-module:bundle:1.0.0-SNAPSHOT : Bundle-Activator not found on the bundle class path or imports: org.ow2.easybeans.osgi.ejbjar.Activator org.apache.maven.plugin.MojoFailureException: Found errors, see log at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:194) at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:123) at org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:118) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage r.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife cycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:48 0) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec ycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail ures(DefaultLifecycleExecutor.jav a:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa ultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle Executor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) 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:585) 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) Cheers, José Pacheco >-- >Cheers, Stuart
