BTW... just FYI, I had just installed m2e build # 1.2.0.2012.0828-1802. Thanks again.
Keith On Wed, Aug 29, 2012 at 6:07 PM, Keith Barlow <[email protected]> wrote: > Igor, > > Attempting to follow your advice, I added the following to my > lifecycle-mapping-metadata.xml: > > <lifecycleMappingMetadata> > <pluginExecutions> > <pluginExecution> > <pluginExecutionFilter> > <goals> > <goal>generate</goal> > </goals> > </pluginExecutionFilter> > <action> > <execute> > <runOnIncremental>false</runOnIncremental> > <runOnConfiguration>true</runOnConfiguration> > </execute> > </action> > </pluginExecution> > </pluginExecutions> > </lifecycleMappingMetadata> > > which seemed to result in a null pointer exception. > > From the .log file: > > 3450 !ENTRY org.eclipse.core.resources 4 75 2012-08-29 17:52:37.351 > 3451 !MESSAGE Errors occurred during the build. > 3452 !SUBENTRY 1 org.eclipse.m2e.core 4 75 2012-08-29 17:52:37.351 > 3453 !MESSAGE Errors running builder 'Maven Project Builder' on project > 'project1'. > 3454 !STACK 0 > 3455 java.lang.NullPointerException > 3456 at > org.eclipse.m2e.core.internal.lifecyclemapping.model.PluginExecutionFilter.match(PluginExecutionFilter.java:323) > 3457 at > org.eclipse.m2e.core.internal.lifecyclemapping.SimpleMappingMetadata > Source.getPluginExecutionMetadata(SimpleMappingMetadataSource.java:71) > 3458 at > org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateEffectiveLifecycleMappingMetadata(LifecycleMappingFactory.java: > 490) > 3459 at > org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateEffectiveLifecycleMappingMetadata(LifecycleMappingFactory.java: > 224) > 3460 at > org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateLifecycleMapping(LifecycleMappingFactory.java:175) > 3461 at > org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.setupLifecycleMapping(ProjectRegistryManager.java:527) > 3462 at > org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:446) > 3463 at > org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:328) > 3464 at > org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:279) > 3465 at > org.eclipse.m2e.core.internal.project.registry.MavenProjectManager.refresh(MavenProjectManager.java:58) > 3466 at > org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:87) > 3467 at > org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) > 3468 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) > 3469 at > org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) > 3470 at > org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) > 3471 at > org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) > 3472 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) > 3473 at > org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) > 3474 at > org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) > 3475 at > org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) > 3476 at > org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) > 3477 at > org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) > 3478 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) > > I tried adding the groupId and artifactId to the lifecycle mapping > declaration but don't know that it helped... I haven't been able to > reproduce the NPE or resolve the complaints about lack of lifecycle > information in the POM editor... > > Am I doing something wrong? > > Thanks. > > Keith > > On Wed, Aug 29, 2012 at 1:22 PM, Igor Fedorenko <[email protected]>wrote: > >> >> >> On 12-08-29 1:01 PM, Keith Barlow wrote: >> >>> The plugin is a customized xjc plugin so if I understand you correctly, >>> I have two options: >>> >>> 1.) Configure it for execute which requires adding code which uses the >>> plexus-build-api to make workspace changes. (e.g. I could have the >>> generated files added to the build path if desired or I could just leave >>> that as a manual task but would still need a no-op implementation to be >>> executed). >>> >> >> Assuming the goal is to have generated files visible as java sources in >> workspace, the mapping needs to >> >> runOnConfiguration=true, such that source root folders added by the >> plugin are created as Eclipse java project source folders. This does not >> require use of BuildContext >> >> runOnIncremental can be either true of false. runOnIncremental=false >> does not require use of BuildContext either, but source code will only >> be (re)generated during full/clean workspace build and will require >> manual project refresh. For automatic generation of sources, >> runOnIncremental=true and use of BuildContext is required >> >> >> >>> 2.) Add it as ignore which would suppress all error messages and prevent >>> the plugin from being executed unless I actually do a maven build. >>> (which is essentially what happens now only I do get error messages.) >>> >>> >> This will completely ignore the plugin in Eclipse. You will need to >> create java source folders in Eclipse and run the code generation >> manually. >> >> -- >> Regards, >> Igor >> >> Is that correct? >>> >>> (Thanks in advance.) >>> >>> Keith >>> >>> On Wed, Aug 29, 2012 at 12:43 PM, Igor Fedorenko <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> If your maven plugin can safely participate Eclipse incremental >>> build, >>> which in practice means it can either be safely ignored or plugin >>> code >>> uses plexus BuildContext to negotiate changes, the mapping metadata >>> can >>> be embedded in maven plugin itself. See [1] for more details. >>> >>> If mapping requires Eclipse-specific logic not currently achievable >>> through BuildContext, then you need to write an Eclipse plugin that >>> provides the implementation of the logic and mapping xml file. >>> >>> [1] >>> http://wiki.eclipse.org/M2E___**compatible_maven_plugins<http://wiki.eclipse.org/M2E___compatible_maven_plugins> >>> >>> >>> <http://wiki.eclipse.org/M2E_**compatible_maven_plugins<http://wiki.eclipse.org/M2E_compatible_maven_plugins> >>> > >>> >>> -- >>> Regards, >>> Igor >>> >>> >>> On 12-08-29 12:31 PM, Keith Barlow wrote: >>> >>> Hiyas, >>> >>> We have a customized maven plugin we use in our company which >>> doesn't >>> have lifecycle mapping metadata for it... How do I add a local >>> entry to >>> the new Lifecycle Mappings preferences feature in m2e? I looked >>> at the >>> developer documentation for extension development and it defines >>> a >>> lifecycle mapping xml blob but it looks like that needs to point >>> to some >>> kind of configurator class... is that required for local >>> entries? >>> where would it live? >>> >>> Thanks. >>> >>> Keith >>> >>> -- >>> Keith Barlow >>> >>> /Software Engineer/ >>> *Dell Boomi* >>> >>> >>> >>> ______________________________**___________________ >>> m2e-users mailing list >>> [email protected] <mailto:[email protected]> >>> >>> https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users> >>> >>> <https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users> >>> > >>> >>> ______________________________**___________________ >>> m2e-users mailing list >>> [email protected] <mailto:[email protected]> >>> >>> https://dev.eclipse.org/__**mailman/listinfo/m2e-users<https://dev.eclipse.org/__mailman/listinfo/m2e-users> >>> >>> >>> <https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users> >>> > >>> >>> >>> >>> >>> -- >>> Keith Barlow >>> >>> /Software Engineer/ >>> *Dell Boomi* >>> >>> >>> >>> ______________________________**_________________ >>> m2e-users mailing list >>> [email protected] >>> https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users> >>> >>> ______________________________**_________________ >> m2e-users mailing list >> [email protected] >> https://dev.eclipse.org/**mailman/listinfo/m2e-users<https://dev.eclipse.org/mailman/listinfo/m2e-users> >> > > > > -- > Keith Barlow > > *Software Engineer* > *Dell Boomi* > > -- Keith Barlow *Software Engineer* *Dell Boomi*
_______________________________________________ m2e-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/m2e-users
