So does this mean that not specifying the groupId, artifactId, and version information is only valid when declaring the metadata in the plugin itself (META-INF/m2e/lifecycle-mapping-metadata.xml)?
Also, just as a heads up, I tried to update all the projects in my workspace and our platform project (which admittedly has the most complicated configuration) threw the following exception: 5244 !ENTRY org.eclipse.core.jobs 4 2 2012-08-30 10:56:12.704 5245 !MESSAGE An internal error occurred during: "Updating Maven Project". 5246 !STACK 0 5247 java.lang.IllegalArgumentException: Unsupported IClasspathEntry kind=4 5248 at org.eclipse.m2e.jdt.internal.ClasspathEntryDescriptor.toClasspathEntry(ClasspathEntryDescriptor.java:131) 5249 at org.eclipse.m2e.jdt.internal.ClasspathDescriptor.getEntries(ClasspathDescriptor.java:134) 5250 at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:141) 5251 at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:109) 5252 at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:414) 5253 at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:351) 5254 at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:74) 5255 at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) 5256 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) I am not sure if it's directly related to the topic we have been discussing but it sounds like there is something that is attempting to be added to the classpath that should not be there? Maybe another exemption needs to be added somewhere? Let me know if I can get you more info... the project is very complicated so I wouldn't even know where to begin trying to guess what caused the exception. I have found that I typically have to build it from the command line and have turned off all the eclipse project configurators due to it's size and intricacy. Thanks again. Keith On Thu, Aug 30, 2012 at 10:40 AM, Keith Barlow <[email protected]> wrote: > Yes, that worked! > > Thank you. > > Keith > > > On Thu, Aug 30, 2012 at 10:36 AM, Matthew Piggott > <[email protected]>wrote: > >> Make sure you're specifying a version. >> >> >> On 30 August 2012 10:35, Keith Barlow <[email protected]> wrote: >> >>> Igor, >>> >>> No, I am referring to the lifecycle-mapping-metadata.xml file referenced >>> in the Eclipse Preferences->Maven->Lifecycle Mappings which I currently >>> have created a file in the default location of >>> "~/workspace/.metadata/.plugins/org.eclipse.m2e.core/lifecycle-mapping/metadata.xml" >>> (NOTE: I have the full path even though I only wrote out the relative one >>> here.) >>> >>> I hadn't tried updating project info before but did not and am >>> definitively getting a null pointer both with and without specifing groupId >>> and artifactId. Here are the NPEs: >>> >>> Without groupId and artifactId: >>> >>> 4452 !ENTRY org.eclipse.core.jobs 4 2 2012-08-30 10:25:28.180 >>> 4453 !MESSAGE An internal error occurred during: "Updating Maven >>> Project". >>> 4454 !STACK 0 >>> 4455 java.lang.NullPointerException >>> 4456 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.model.PluginExecutionFilter.match(PluginExecutionFilter.java:323) >>> 4457 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.SimpleMappingMetadataSource.getPluginExecutionMetadata(SimpleMappingMetadataSource.java:71) >>> 4458 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateEffectiveLifecycleMappingMetadata(LifecycleMappingFactory.java: >>> 490) >>> 4459 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateEffectiveLifecycleMappingMetadata(LifecycleMappingFactory.java: >>> 224) >>> 4460 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateLifecycleMapping(LifecycleMappingFactory.java:175) >>> 4461 at >>> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.setupLifecycleMapping(ProjectRegistryManager.java:527) >>> 4462 at >>> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:446) >>> 4463 at >>> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:328) >>> 4464 at >>> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:279) >>> 4465 at >>> org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:323) >>> 4466 at >>> org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:74) >>> 4467 at >>> org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) >>> 4468 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) >>> >>> *With groupId and artifactId:* >>> >>> 4473 !ENTRY org.eclipse.core.jobs 4 2 2012-08-30 10:28:28.662 >>> 4474 !MESSAGE An internal error occurred during: "Updating Maven >>> Project". >>> 4475 !STACK 0 >>> 4476 java.lang.NullPointerException >>> 4477 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.model.PluginExecutionFilter.match(PluginExecutionFilter.java:337) >>> 4478 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.SimpleMappingMetadataSource.getPluginExecutionMetadata(SimpleMappingMetadataSource.java:71) >>> 4479 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateEffectiveLifecycleMappingMetadata(LifecycleMappingFactory.java: >>> 490) >>> 4480 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateEffectiveLifecycleMappingMetadata(LifecycleMappingFactory.java: >>> 224) >>> 4481 at >>> org.eclipse.m2e.core.internal.lifecyclemapping.LifecycleMappingFactory.calculateLifecycleMapping(LifecycleMappingFactory.java:175) >>> 4482 at >>> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.setupLifecycleMapping(ProjectRegistryManager.java:527) >>> 4483 at >>> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:446) >>> 4484 at >>> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:328) >>> 4485 at >>> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:279) >>> 4486 at >>> org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:323) >>> 4487 at >>> org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:74) >>> 4488 at >>> org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) >>> 4489 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) >>> >>> Thanks. >>> >>> Keith >>> >>> On Wed, Aug 29, 2012 at 10:22 PM, Igor Fedorenko <[email protected]>wrote: >>> >>>> You are talking about META-INF/m2e/lifecycle-**mapping-metadata.xml >>>> inside >>>> your maven plugin jar, right? For the record, m2e is able to use mapping >>>> metadata from test maven plugin [1]. >>>> >>>> Do you Update Project Configuration after changing mapping metadata? >>>> There may be a problem with -SNAPSHOT plugins, so you may need to >>>> restart Eclipse for m2e to pick up new metadata. >>>> >>>> >>>> [1] https://github.com/sonatype/**m2e-core-tests/blob/master/** >>>> org.eclipse.m2e.tests/**repositories/testrepo-src/** >>>> test-embeddedmapping-plugin/**src/main/resources/META-INF/** >>>> m2e/lifecycle-mapping-**metadata.xml<https://github.com/sonatype/m2e-core-tests/blob/master/org.eclipse.m2e.tests/repositories/testrepo-src/test-embeddedmapping-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml> >>>> >>>> -- >>>> Regards, >>>> Igor >>>> >>>> >>>> On 12-08-29 6:07 PM, Keith Barlow 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.**calculateEffectiveLifecycleMap** >>>>> pingMetadata(**LifecycleMappingFactory.java: >>>>> 490) >>>>> 3459 at >>>>> org.eclipse.m2e.core.internal.**lifecyclemapping.** >>>>> LifecycleMappingFactory.**calculateEffectiveLifecycleMap** >>>>> pingMetadata(**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] >>>>> <mailto:[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]> >>>>> <mailto:[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> >>>>> > >>>>> >>>>> >>>>> >>>>> <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]> >>>>> <mailto:[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> >>>>> > >>>>> <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]> >>>>> <mailto:[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> >>>>> > >>>>> >>>>> >>>>> >>>>> <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] <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* >>> >>> >>> _______________________________________________ >>> m2e-users mailing list >>> [email protected] >>> https://dev.eclipse.org/mailman/listinfo/m2e-users >>> >>> >> >> _______________________________________________ >> m2e-users mailing list >> [email protected] >> 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
