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

Bug 362353

Summary: m2e ignores <sourceDirectory>
Product: z_Archived Reporter: Scott Sosna <scott.sosna>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: igor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
working example none

Description Scott Sosna CLA 2011-10-28 14:33:57 EDT
Build Identifier: 20110916-0149

When an existing project does not follow the maven directory structure, <sourceDirectory> is specified to tell maven when the source (or resources or whatever) is located.  m2e is ignoring the sourceDirectory and insisting on using normal maven directory structure.

When used outside of Eclipse, the maven builds the project correctly.  When used within Eclipse, maven doesn't find any source code to compile.  The behavior should be consistent, and since it builds correctly with maven, it should build identically within Eclipse

Reproducible: Always

Steps to Reproduce:
1.Have a POM with <sourceDirectory> specified
2.Create a new Eclipse project by specifying the existing project directory (i.e., where the POM lives)
3.Do a maven install within Eclipse.  The project doesn't build.
4.Attempt to change the project settings to specify a different source directory.  This option has been disabled.
5.Attempt to navigate to a class.  No classes are listed because Eclipse doesn't think the project has any source (and therefore classes).
Comment 1 Igor Fedorenko CLA 2011-10-28 15:20:34 EDT
Created attachment 206150 [details]
working example

I am unable to reproduce the problem using current 1.1 build. Feel free to reopen if you can provide complete standalone example that demonstrates the problem
Comment 2 Scott Sosna CLA 2011-10-31 11:12:05 EDT
The version available from http://download.eclipse.org/releases/indigo is 1.0.100.20110804-1717.  Version 1.1 appears to only be a SNAPSHOT and not a release at this point.  Is there a build available of 1.1?  Expecting developers to install this manually and not through Eclipse is a non-starter for me.

This bug should stay open until 1.1 is generally available.
Comment 3 Igor Fedorenko CLA 2011-10-31 18:12:34 EDT
Have you actually *tried* released m2e 1.0.100.20110804-1717 with the attached project? It works. Please reopen if you can provide sample standalone example project and steps to reproduce the problem with current released version of m2e.
Comment 4 Denis Roy CLA 2021-04-19 13:23:31 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/