Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367385 - NPE while changing resource in pom.xml
Summary: NPE while changing resource in pom.xml
Status: CLOSED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-22 01:31 EST by Andrey Rodionov CLA
Modified: 2021-04-19 13:27 EDT (History)
1 user (show)

See Also:


Attachments
sample working project (1.44 KB, application/x-gzip)
2011-12-22 15:47 EST, Igor Fedorenko CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Rodionov CLA 2011-12-22 01:31:16 EST
Steps to reproduce:
1. Add resources->resource to pom.xml: src/main/conf.
2. Maven will use directory for resources instead of default: src/main/resources
3. Click Maven -> Update project configuration...->Ok
4. NPE dialog. In logs:

!ENTRY org.eclipse.core.jobs 4 2 2011-12-22 10:08:46.207
!MESSAGE An internal error occurred during: "Updating Maven Configuration".
!STACK 0
java.lang.NullPointerException
	at java.io.File.<init>(Unknown Source)
	at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.addResourceDirs(AbstractJavaProjectConfigurator.java:375)
	at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.addProjectSourceFolders(AbstractJavaProjectConfigurator.java:306)
	at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:118)
	at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:72)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:302)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:277)
	at org.eclipse.m2e.core.ui.internal.UpdateConfigurationJob.runInWorkspace(UpdateConfigurationJob.java:87)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Igor Fedorenko CLA 2011-12-22 15:47:27 EST
Created attachment 208752 [details]
sample working project

I am unable to reproduce the problem using attached example project and neither m2e 1.0 SR1 nor current 1.1.
Comment 2 Igor Fedorenko CLA 2012-05-21 10:29:19 EDT
Closing old/stale bugreports
Comment 3 Denis Roy CLA 2021-04-19 13:27:13 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/