eclipse debugger: attaching source-code of maven dependencies?

落花浮王杯 提交于 2019-12-02 19:11:26

Looks like issue MNGECLIPSE-983

I have confirmed that if I manually pick the External Archive option and find the relevant -sources jar (navigating that big .m2/repository tree to find it) and then add the jar as a sources it does work, and surprisingly it does remember the next time which isn't too bad.
That's at least doable I think for me because we don't often need to step debug through external dependencies, but when we do, it's often frequent, so adding it once while a bit of a pain, can be done on a case by case basis.

I have since discovered that this problem only occurs if the server is launched using a launch configuration.

The problem does not occur if the server is started by:

  1. click the server icon in the toolbar -> context menu appears
  2. mouse over the intended server -> submenu appears
  3. click on "Start"

While this precludes sharing the server configuration by checking the launch configuration into version control, it at least allows seamless debugging.

Please do the following steps in Eclipse IDE(Tested with Version: 3.5.2),

  1. In Package Explorer, Right Click on the Project which integrated with Maven container.
  2. Select Maven 2 and then select "Fetch Source JARs". The above action wil fetch sources of all the 3rd party jars present in the Maven Classpath.

Regards, Rajesh.

Just put the .m2/repository/ folder itself with the search subfolders option.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!