Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Source not found for referenced maven projects

Separate output folders for main and test classes are essential for correct m2e behaviour. There are no plans to disable this behaviour or let users disable it. I also do not believe it is the real culprit here.
 
Default Eclipse source lookup logic tries to guess runtime classpath and corresponding source path based on JDT default compile classpath logic. This is imprecise at best and often results in missing or wrong sources getting used by the debugger.
 
If you "remote" debugging locally running process, you should be able to use my agent-based source lookup implementation [1]. Installation and configuration instruction are little terse, but I can give more details if you want to try. Note that installation location is outdated, you need to install takari team feature from [2] or from Eclipse marketplace.
 
If you are debugging a process running on a remote system, then the easiest is to configure source lookup path manually. This does not work as precisely as the agent-based source lookup, but I find good-enough when I need to debug something quick.
 
[1] https://github.com/ifedorenko/com.ifedorenko.m2e.sourcelookup
[2] https://repository.takari.io/content/sites/m2e.extras/takari-team/0.1.0/N/LATEST/
--
Regards,
Igor
 
 
On Mon, May 18, 2015, at 04:18 AM, Dagan Sandler wrote:
I was naive enough to think I can inline images...
Anyway,
 
In the problematic scenario described, I see the "classes" and "test-classes" output folders added to the source lookup of the Remote Debug conifguration.
After unchecking the "Allow output folders for source folders" option, I see all source folders added to the source lookup path.
 
Might worth saying - I don't have any unconventional source/resources folders in my projects.
 
 
 
On Mon, May 18, 2015 at 11:10 AM, Dagan Sandler <dagansandler@xxxxxxxxx> wrote:
Hi,
 
When I'm remote debugging a project that has another workspace project as a dependency, I found that the project isn't added correctly to the source lookup path:

Resulting in "Source not found" messages, and sometimes worse - sources of an irrelevant older version jar come up.
 
What I found is that if I uncheck "Allow output folders for source folders" in the "Java Build Path"->"Source" tab under the referenced project, I get the project added to the source lookup path correctly:
 

 
Only problem with this so far - is that the option gets reset every time I do a "Maven Update".
Anyone knows how to make it persist between Maven updates and/or has other insights or solutions to this issue?
 
 
 
 
 
 
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users

Email had 2 attachments:

  • source_lookup1.png
      29k (image/png)
  • source_lookup2.png
      30k (image/png)
 

Back to the top