Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349986

Summary: war with webResources result in "No context maven session"
Product: z_Archived Reporter: Steven Jardine <steve>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: igor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
Simple Maven/Eclipse Project with Error. none

Description Steven Jardine CLA 2011-06-21 15:51:01 EDT
Created attachment 198361 [details]
Simple Maven/Eclipse Project with Error.

I have a web application that configured the maven-war-plugin to copy some files from the module's parent base directory to its WEB-INF directory.

Here is the relevant section of the pom.xml

<webResources>
	<resource>
		<directory>${project.parent.basedir}/etc/deploy</directory>
		<targetPath>WEB-INF/etc/config</targetPath>
		<filtering>false</filtering>
	</resource>
</webResources>

When I execute Project -> Clean in Eclipse Helios SR2 I get the following errror messages:

1.  An error occurred while filtering resources, error-war, line 1, Maven Problem
2.  no context maven session, pom.xml, /error-war, line 1, Maven Problem

If I execute in the Context Menu, Maven -> Update Project Configuration, the error goes away until I execute Project -> Clean again.

Please see attached a simple project that in my system has the problem.  If I remove the webResources section the problem goes away.
Comment 1 Igor Fedorenko CLA 2011-06-22 05:06:19 EDT
Please report m2e-wtp issues at https://issues.sonatype.org/browse/MECLIPSEWTP
Comment 2 Denis Roy CLA 2021-04-19 13:24:50 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/