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

Bug 318809

Summary: "Update Maven Configuration" corrupts WEB project's .classpath
Product: z_Archived Reporter: Fabrice Daugan <fabdouglas>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: igor, pascal, vladnc
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Fabrice Daugan CLA 2010-07-04 08:14:00 EDT
Build Identifier: I20100608-0911

Running a "Update Maven Configuration" to a well configured dynamic web project brake the ".classpath".
Original and also well configured ".classpath" was : 
...
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
  <attributes>
    <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
  </attributes>
</classpathentry>
...

After "Update Maven Configuration", we obtain an incorrect ".classpath" causin some "ClassNotFound" at runtime :
...
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER" />
...

Reproducible: Always

Steps to Reproduce:
1. Create a new "dynamic web project"
2. From Maven menu, on this new project, "Enable Dependecy Management" specifying you create a WAR packaging project
3. From Maven menu, on this new project, "Update Maven Configuration"

Important thing : everything worked fine with 0.9.9 version.
Comment 1 Fabrice Daugan CLA 2010-07-04 08:21:24 EDT
A nice sample is a "https://src.springframework.org/svn/spring-samples/petclinic/trunk" checkout.
Spring team still use the 0.9.9 m2e version.

In a fresh Helios+M2E 0.10.2.20100623-1649 version, "Update Maven Configuration" broke .classpath.

Am I wrong somewhere?
Comment 2 Pascal Rapicault CLA 2010-10-30 16:09:04 EDT
WTP integration is not supported yet in this project. Bug for this should be opened against https://issues.sonatype.org/browse/MNGECLIPSE
Comment 3 Vladimir Nicolici CLA 2011-05-18 08:40:54 EDT
(In reply to comment #2)
> WTP integration is not supported yet in this project. Bug for this should be
> opened against https://issues.sonatype.org/browse/MNGECLIPSE

I hope the last comment is a joke. The sonatype bug repository you specified is read-only, and recommends that we file the bugs against Eclipse Bugzilla:

"This is a READ-ONLY JIRA PROJECT
Use Eclipse Bugzilla to file new bug reports and enhancement requests."

So, to recap, I first found the bug reported and not fixed at http://jira.codehaus.org/browse/MNGECLIPSE-855 . But the codehaus repository was moved to the sonatype repository, so the issue is actually marked as fixed there: https://issues.sonatype.org/browse/MNGECLIPSE-855, in version 0.9.9.200912221003 .

But I have version 0.12, and the problem persists.
Comment 4 Igor Fedorenko CLA 2011-05-18 08:58:24 EDT
The correct repository to file problem reports and enhancement requests for m2e-wtp integration is https://issues.sonatype.org/browse/MECLIPSEWTP
Comment 5 Igor Fedorenko CLA 2011-05-18 09:36:38 EDT
*** Bug 346237 has been marked as a duplicate of this bug. ***
Comment 6 Denis Roy CLA 2021-04-19 13:25:13 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/