Quantcast

Could not run features-maven-plugin's generate-features-xml goal.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Could not run features-maven-plugin's generate-features-xml goal.

srinj63u
Hi,

I am trying to generate features.xml using features-maven-plugin. The environment is jdk1.6.0_17, apache-maven-2.2.1. My code snippet is :

                        <plugin>
                                <groupId>org.apache.karaf.tooling</groupId>
                                <artifactId>features-maven-plugin</artifactId>
                                <version>2.2.4</version>
                                <executions>
                                   <execution>
                                      <id>generate</id>
                                      <phase>install</phase>
                                      <goals>
                                        <goal>generate-features-xml</goal>
                                      </goals>
                                      <configuration>
                                        <outputFile>target/features.xml</outputFile>
                                      </configuration>
                                   </execution>
                                 </executions>
                        </plugin>

When I try to run the plugin, I am getting the following exception:

org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.karaf.tooling:features-maven-plugin:2.2.4:generate-features-xml': Unable to find the mojo 'generate-features-xml' (or one of its required components) in the plugin 'org.apache.karaf.tooling:features-maven-plugin'
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:698)
        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: org.apache.maven.plugin.PluginManagerException: Unable to find the mojo 'generate-features-xml' (or one of its required components) in the plugin 'org.apache.karaf.tooling:features-maven-plugin'
        at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:674)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.apache.maven.plugin.Mojoorg.apache.karaf.tooling:features-maven-plugin:2.2.4:generate-features-xml', it could not be started
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:339)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
        at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:652)
        ... 19 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLifecycleException: Error starting component
        at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:109)
        at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95)
        at org.codehaus.plexus.component.manager.PerLookupComponentManager.getComponent(PerLookupComponentManager.java:48)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
        ... 21 more
Caused by: org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException: Error composing component
        at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:33)
        at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101)
        at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105)
        ... 24 more
Caused by: org.codehaus.plexus.component.composition.CompositionException: Composition failed for the field dependencyTreeBuilder in object of type org.apache.karaf.tooling.features.GenerateFeaturesXmlMojo
        at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:144)
        at org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:73)
        at org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:68)
        at org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486)
        at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29)
        ... 26 more
Caused by: java.lang.IllegalArgumentException: Can not set org.apache.maven.shared.dependency.tree.DependencyTreeBuilder field org.apache.karaf.tooling.features.GenerateFeaturesXmlMojo.dependencyTreeBuilder to org.apache.maven.shared.dependency.tree.DefaultDependencyTreeBuilder
        at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
        at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
        at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
        at java.lang.reflect.Field.set(Field.java:657)
        at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:137)
        ... 30 more

Loading...