Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] PluginExecutionMetadata throws NullPointerException

Could the problem be a missing action section for the jaxws plugin?
If this is the problem, please report it as a NPE isn't very nice
although it's a misconfiguration on your part.

/Anders

On Wed, Aug 17, 2011 at 10:54, Stevo Slavić <sslavic@xxxxxxxxx> wrote:
> Hello m2e users,
>
> When automatically building project, m2e throws NPE (see stacktrace [1])
>
> Parent module defines lifecycle-mapping to just allow execution of
> cxf-codegen-plugin and jaxws-maven-plugin (see [2] for relevant pom
> snippet)
>
> Eclipse 3.7 and m2e 1.0 are used.
>
> There are already tickets for m2e connectors/extensions for mentioned
> plugins ( https://bugs.eclipse.org/bugs/show_bug.cgi?id=350081 and
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=349939 ) but IMO NPE is
> a bug. Or am I doing something wrong?
>
> Couldn't find any related bug reported.
> Searched first for bugs using:
> https://bugs.eclipse.org/bugs/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=m2e&content=PluginExecutionMetadata
>
> Following search returned some results but they are not same issue:
> https://bugs.eclipse.org/bugs/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=m2e&content=NullPointerException
>
> Regards,
> Stevo.
>
>
> [1] stacktrace from eclipse workspace log file
> !ENTRY org.eclipse.core.resources 4 75 2011-08-17 08:57:02.623
> !MESSAGE Errors occurred during the build.
> !SUBENTRY 1 org.eclipse.m2e.core 4 75 2011-08-17 08:57:02.623
> !MESSAGE Errors running builder 'Maven Project Builder' on project 'foo-bar'.
> !STACK 0
> java.lang.NullPointerException
>        at org.eclipse.m2e.core.internal.lifecyclemapping.model.PluginExecutionMetadata.getAction(PluginExecutionMetadata.java:81)
>        at org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.isPrimaryMapping(LifecycleMappingFactory.java:968)
>        at org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateEffectiveLifecycleMappingMetadata(LifecycleMappingFactory.java:296)
>        at org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateEffectiveLifecycleMappingMetadata(LifecycleMappingFactory.java:208)
>        at org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateLifecycleMapping(LifecycleMappingFactory.java:159)
>        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.setupLifecycleMapping(ProjectRegistryManager.java:526)
>        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:445)
>        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:327)
>        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:278)
>        at org.eclipse.m2e.core.internal.project.registry.MavenProjectManager.refresh(MavenProjectManager.java:58)
>        at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:120)
>        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
>        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
>        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
>        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
>        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
>        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
>        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
>        at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
>        at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
>        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>
>
>
> [2] pom snippet with lifecycle-mapping
>
>                <plugin>
>                        <groupId>org.eclipse.m2e</groupId>
>                        <artifactId>lifecycle-mapping</artifactId>
>                        <version>1.0.0</version>
>                        <configuration>
>                                <lifecycleMappingMetadata>
>                                        <pluginExecutions>
>                                                <pluginExecution>
>                                                        <pluginExecutionFilter>
>                                                                <groupId>org.apache.cxf</groupId>
>                                                                <artifactId>cxf-codegen-plugin</artifactId>
>                                                                <versionRange>[2.1.3,)</versionRange>
>                                                                <goals>
>                                                                        <goal>wsdl2java</goal>
>                                                                </goals>
>                                                        </pluginExecutionFilter>
>                                                        <action>
>                                                                <execute />
>                                                        </action>
>                                                </pluginExecution>
>                                                <pluginExecution>
>                                                        <pluginExecutionFilter>
>                                                                <groupId>org.codehaus.mojo</groupId>
>                                                                <artifactId>jaxws-maven-plugin</artifactId>
>                                                                                <versionRange>[1.12,)</versionRange>
>                                                                                <goals>
>                                                                                        <goal>wsimport</goal>
>                                                                                </goals>
>                                                        </pluginExecutionFilter>
>                                                </pluginExecution>
>                                        </pluginExecutions>
>                                </lifecycleMappingMetadata>
>                        </configuration>
>                </plugin>
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-users
>

Back to the top