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

Bug 355292

Summary: Error message: No context maven session
Product: z_Archived Reporter: Christian Kaltepoth <christian>
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   
Whiteboard:
Attachments:
Description Flags
Project to reproduce this issue
none
Update Project to reproduce this issue!!! none

Description Christian Kaltepoth CLA 2011-08-20 04:55:01 EDT
Created attachment 201851 [details]
Project to reproduce this issue

I just tried to import the current snapshot of Seam Faces into my fresh installation of Eclipse Indigo (with m2e 1.0.0 installed).

I get the error message "No context maven session" for some of the pom.xml files after the import.

Steps to reproduce:

 * Unpack attached file "seam-faces-784ee638e6b73.zip" to some directory (UNPACK_DIR)
 * Use "Import -> Existing Maven Project" and choose "UNPACK_DIR/seam-faces/api/"
 * You will see the error message "No context maven session" in the pom.xml

I even found a workaround to fix this issue. Open "UNPACK_DIR/seamfaces/pom.xml" (the parent pom "org.jboss.seam.faces:seam-faces-parent" of the api module) and remove the parent element in there (referencing another parent "org.jboss.seam:seam-parent"). The error doesn't appear now anymore but I get tons of other errors due to the missing declarations from the second master pom.
Comment 1 Christian Kaltepoth CLA 2011-08-20 05:24:01 EDT
Created attachment 201852 [details]
Update Project to reproduce this issue!!!

Sorry, I forgot to mention that you should run the complete build once from the console before importing into Eclipse. I attached an updated project that contains all required repositories for the build.
Comment 2 Igor Fedorenko CLA 2011-08-22 17:54:31 EDT
I am unable to reproduce the problem using attached project using m2e 1.0.0 installed as part of Indigo "IDE for Java Developers". Do you see any relevant messages in m2e log file (found under .metadata/.plugins/org.eclipse.m2e.logback.configuration) or eclipse .log file?
Comment 3 Christian Kaltepoth CLA 2011-08-27 04:48:00 EDT
Hey Igor,

thank you very much for looking into this. I was very surprised that this problem doesn't occur in your test. I spent some time to verify that the problem is reproducible with the project I attached to the ticket. I tried multiple times with a clean workspace and fresh checkouts of the project.

I just set up a fresh Indigo installation with just M2E installed (1.0.0). To my surprise the error didn't occur any more. A removed and imported the "api" package multiple times and everything works fine.

Then I imported the demo web applications which are separate modules in the project. M2E then installed "Maven Integration for WTP 1.13.1" automatically. After Indigo restarted the error occurred again. It even occurs if I remove ALL projects from the workspace and then just import the "api" module (like described in my "steps to reproduce"). I always get "No context maven session".

Then I uninstalled the "Maven Integration for WTP 1.13.1" plugin and after a restart everything works fine again.

So it seems like this problem is caused by "Maven Integration for WTP" which is very weird because the problem occurs for non-WAR projects (like the API module).

Is "Maven Integration for WTP" official part of M2E? So is the ticket still in the right place? :)

Thanks

Christian
Comment 4 Igor Fedorenko CLA 2011-08-27 08:51:45 EDT
No, m2e-wtp is not part of m2e and m2e-wtp related problems should be reported to https://issues.sonatype.org/browse/MECLIPSEWTP.

Even though m2e does offer installation of m2e-wtp as part of project import, you don't have to install it and should be able to uninstall if you did accidentally install.
Comment 5 Denis Roy CLA 2021-04-19 13:27:20 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/