maven项目debug查看依赖包源代码办法
2017-03-06 11:08
1221 查看
默认的maven工程,好像很难加载依赖的源代码
办法如下:
maven调试时,无法进入源码
办法一,在debug配置里面,找到source,把带source的jar包,放进去,添加的时候,选add,再选external archive。这里要注意,加了后,要重启debug要不然,还是不行
办法二,打开build path,在libraries里面,找到相关的jar,然后双击source attachment,把source关联照过来
最后一个办法,也是最有用的办法
二。安装下面的插件,然后做代码关联
m2e.sourcelookup
Eclipse Plugin that provides Maven Dependencies as Source Container in JDT Launching Configuration.
Update site (P2 Repo): https://bjmi.github.io/update-site/
Note: Ensure artifact sources are present in local maven repository or enable Window > Preferences > Maven > Download Artifact Sources in Eclipse
http://ifedorenko.github.com/m2e-extras/
不清楚的可以看下面
http://stackoverflow.com/questions/12598261/maven-build-debug-in-eclipse https://github.com/bjmi/m2e.sourcelookup
这里直接安装https://bjmi.github.io/update-site/好像就可以了,昨天安装的
但是这个办法,不是随便能成功的。eclipse不同版本,可能会安装失败。Version: Luna Service Release 2 (4.4.2),我试过最惨的,因为安装不了
m2e.sourcelookup,报错如下:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclipse.m2e.archetype.common,1.7.0.20160603-1931
No repository found containing: osgi.bundle,org.eclipse.m2e.core,1.7.0.20160603-1933
然后,就重新安装了m2e,在线的安装,结果,居然把原来的maven菜单和配置全搞没了。后来,换了一个版本的eclipse,Version: Mars.2 Release (4.5.2)
然后再安装
m2e.sourcelookup https://bjmi.github.io/update-site/,然后在debug配置环境中,加上maven dependencies of 'my Project',实际操作是,点add 然后看到maven的东西,点进来
办法如下:
maven调试时,无法进入源码
办法一,在debug配置里面,找到source,把带source的jar包,放进去,添加的时候,选add,再选external archive。这里要注意,加了后,要重启debug要不然,还是不行
办法二,打开build path,在libraries里面,找到相关的jar,然后双击source attachment,把source关联照过来
最后一个办法,也是最有用的办法
二。安装下面的插件,然后做代码关联
m2e.sourcelookup
Eclipse Plugin that provides Maven Dependencies as Source Container in JDT Launching Configuration.
Update site (P2 Repo): https://bjmi.github.io/update-site/
Note: Ensure artifact sources are present in local maven repository or enable Window > Preferences > Maven > Download Artifact Sources in Eclipse
http://ifedorenko.github.com/m2e-extras/
不清楚的可以看下面
http://stackoverflow.com/questions/12598261/maven-build-debug-in-eclipse https://github.com/bjmi/m2e.sourcelookup
这里直接安装https://bjmi.github.io/update-site/好像就可以了,昨天安装的
但是这个办法,不是随便能成功的。eclipse不同版本,可能会安装失败。Version: Luna Service Release 2 (4.4.2),我试过最惨的,因为安装不了
m2e.sourcelookup,报错如下:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclipse.m2e.archetype.common,1.7.0.20160603-1931
No repository found containing: osgi.bundle,org.eclipse.m2e.core,1.7.0.20160603-1933
然后,就重新安装了m2e,在线的安装,结果,居然把原来的maven菜单和配置全搞没了。后来,换了一个版本的eclipse,Version: Mars.2 Release (4.5.2)
然后再安装
m2e.sourcelookup https://bjmi.github.io/update-site/,然后在debug配置环境中,加上maven dependencies of 'my Project',实际操作是,点add 然后看到maven的东西,点进来
相关文章推荐
- 在Maven项目中加入gradle依赖项,查看开源库gradle 的配置地址mvnrepository.com中搜索
- Intellij IDEA 中如何查看maven项目中所有jar包的依赖关系图
- 如何查看Maven项目中的jar包依赖树情况?
- 如何查看Maven项目中的jar包依赖树情况
- IDEA maven项目查自动查看依赖关系,解决包冲突问题
- 查看maven项目的依赖关系 mvn dependency:tree
- Intellij IDEA 中如何查看maven项目中所有jar包的依赖关系图
- Intellij IDEA 中如何查看maven项目中所有jar包的依赖关系图
- 查看Maven项目的jar包依赖
- maven项目在eclipse中debug时查看源码的办法
- eclipse(优化七) eclipse maven项目debug模式无法查看源码
- 使用Maven管理依赖JAR文件,自定义项目布局,利用ANT生成不同的发布包
- Maven项目主要需要的依赖
- eclipse 使用maven 自动解决开源maven项目依赖包问题
- Maven坐标、依赖的介绍之发送邮件示例项目
- 设置maven本地资源库及eclipse项目依赖库
- maven依赖项目eclips空心j问题
- 用eclipse的m2eclipse插件,设置maven项目的依赖关系
- Eclipse+Maven快速生成Web项目,解决部署时Maven lib依赖问题
- maven项目中添加对本地jdk tools.jar 的依赖