Eclipse在调试视图中不显示maven依赖关系的源代码 [英] Eclipse does not show source code of maven dependencies in debug view

查看:726
本文介绍了Eclipse在调试视图中不显示maven依赖关系的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在提交了一个错误:






在下载Eclipse Mars 2之后,完全删除我的项目并重新导入它,而不需要任何 .settings .project .classpath 文件,我仍然看到这个问题。我不知道这是否真的是一个Eclipse错误,但在这一点上,我不知道还有什么可能的。



我还尝试删除 C:\Users\< username> \.eclipse 并重新启动IDE没有不同的结果。



这些是Maven依赖关系下包含的库。你可以看到例如$ code> spring-security-core - *。jar 被包含,源代码指向本地的maven存储库。点击编辑我看到完整路径 C:/Users/Stefan/.m2/repository/org/springframework/security/spring-security-core/4.0.3.RELEASE /spring-security-core-4.0.3.RELEASE-sources.jar 是的,该文件真的在那里。





我的类路径变量



解决方案

我不知道实际的问题是什么,为什么停止工作。因为你可以从我的问题中删除,我实际上下载了一个干净的Eclipse版本,检出了这个裸体项目,并用maven导入没有结果。



但是,我发现这个 com.ifedorenko.m2e.sourcelookup 插件。该链接在​​ Java调试:未找到源中提供。



转到帮助>安装新软件.. 并使用


http://ifedorenko.github。 com / m2e-extras /


搜索链接。安装此插件后,我终于可以调试依赖项的源代码。


I've filed a bug by now: 495662 - Source Lookup: Not seeing source code in the debug view.


My issue sounds familiar but it can't be since that issue appears to be fixed. However, I have set a breakpoint in a class coming from a dependency (via maven). The source code got downloaded but as the program reaches the line all I get to see is

Source not found.

I've tried to add lookup paths by clicking at "Edit Source Lookup Path..." but nothing changed. I don't know what I have to add such that the debugger finds the sources.

It appears that this stopped working for all my dependencies.

How did I break my source lookups and how can I fix it?


Could be important:

I am running my tomcat from a maven build these goals:

tomcat7:run-war -am -pl mz-web-server -Denv=dev

but this hasn't been a problem so far.


Further, none of my maven dependencies e.g. gwt-user*.jar or `spring*.jar or anything are listed in the Source Lookup Path. There is only the "Default" path which doesn't contain it either - shouldn't those jars be somewhat listed there?


After downloading Eclipse Mars 2, removing my project completely and re-importing it without any .settings, .project or .classpath files, I am still seeing this problem. I can't tell if this is really an Eclipse bug but at this point I don't know what else it could be.

I also tried removing C:\Users\<username>\.eclipse and restarted the IDE without different results.

These are the included libraries under Maven Dependencies. As you can see e.g. spring-security-core-*.jar is included and the source is pointing to the local maven repository. Clicking on edit I see the full path C:/Users/Stefan/.m2/repository/org/springframework/security/spring-security-core/4.0.3.RELEASE/spring-security-core-4.0.3.RELEASE-sources.jar and yes, the file is really there.

My Classpath Variables:

解决方案

I don't know what the actual problem was and why it stopped working. As you can take out of my question I actually downloaded a clean version of Eclipse, checked out the naked project and imported it with maven without results.

However, I found this com.ifedorenko.m2e.sourcelookup plugin. The link was provided in "Java Debugging: Source not found".

Go to Help > Install New Software .. and use

http://ifedorenko.github.com/m2e-extras/

to search for the links. After installing this plugin I was finally able to debug the source code of dependencies.

这篇关于Eclipse在调试视图中不显示maven依赖关系的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆