Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340285 - NPE during import of project with packaging "bundle"
Summary: NPE during import of project with packaging "bundle"
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 347623 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-17 05:34 EDT by Konrad Windszus CLA
Modified: 2021-04-19 13:24 EDT (History)
4 users (show)

See Also:


Attachments
POM for bundle project (662 bytes, text/xml)
2011-03-17 05:38 EDT, Konrad Windszus CLA
no flags Details
Eclipse configuration (482.47 KB, text/plain)
2011-03-17 05:41 EDT, Konrad Windszus CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konrad Windszus CLA 2011-03-17 05:34:07 EDT
If I have a pom file with a packaging "bundle" (using the maven-bundle-plugin), I always get an NPE with 0.12.1. This is the stacktrace:

eclipse.buildId=M20100909-0800
java.version=1.6.0_24
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.jee.product -keyring /Users/kwindszus/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -keyring /Users/kwindszus/.eclipse_keyring -showlocation


Error
Thu Mar 17 10:28:47 CET 2011
An internal error occurred during: "Importing Maven projects".

java.lang.NullPointerException
	at org.apache.maven.plugin.DefaultPluginDescriptorCache$CacheKey.<init>(DefaultPluginDescriptorCache.java:165)
	at org.apache.maven.plugin.DefaultPluginDescriptorCache.createKey(DefaultPluginDescriptorCache.java:62)
	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:136)
	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
	at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:192)
	at org.maven.ide.eclipse.internal.embedder.MavenImpl.getMojoParameterValue(MavenImpl.java:765)
	at org.maven.ide.eclipse.jdt.internal.AbstractJavaProjectConfigurator.getCompilerLevel(AbstractJavaProjectConfigurator.java:399)
	at org.maven.ide.eclipse.jdt.internal.AbstractJavaProjectConfigurator.addJavaProjectOptions(AbstractJavaProjectConfigurator.java:370)
	at org.maven.ide.eclipse.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:95)
	at org.maven.ide.eclipse.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:57)
	at org.maven.ide.eclipse.internal.project.GenericLifecycleMapping.configure(GenericLifecycleMapping.java:48)
	at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:306)
	at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.configureNewMavenProject(ProjectConfigurationManager.java:240)
	at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:146)
	at org.maven.ide.eclipse.wizards.MavenImportWizard$1.runInWorkspace(MavenImportWizard.java:94)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Attached you find a sample pom, with which you can reproduce the issue.
Comment 1 Konrad Windszus CLA 2011-03-17 05:38:26 EDT
Created attachment 191390 [details]
POM for bundle project
Comment 2 Konrad Windszus CLA 2011-03-17 05:41:26 EDT
Created attachment 191391 [details]
Eclipse configuration
Comment 3 Milos Kleint CLA 2011-03-17 05:46:09 EDT
seems to be related to https://issues.sonatype.org/browse/MNGECLIPSE-2555

could you please try in the Eclipse indigo M5 or upcoming Indigo M6 build?
Comment 4 Konrad Windszus CLA 2011-03-17 06:01:34 EDT
Seems to be fixed with the latest 0.13 version. Is it possible to work around that problem in 0.12.1 (e.g. by providing a project configurator for bundle plugins)?
Comment 5 Igor Fedorenko CLA 2011-03-17 09:46:36 EDT
Yes, this is a dup of https://issues.sonatype.org/browse/MNGECLIPSE-2555 and it is fixed in master. There are no plan to backport the fix to 0.12. As a workaround, you can add version to all maven plugins bound to project build lifecycle (via pluginManagemenet, for example).
Comment 6 Igor Fedorenko CLA 2011-05-30 07:43:45 EDT
*** Bug 347623 has been marked as a duplicate of this bug. ***
Comment 7 Denis Roy CLA 2021-04-19 13:24:32 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/