简体   繁体   English

无法在“ Apache Tomcat”运行配置中正确显示“ Gradle Dependencies”

[英]“Gradle Dependencies” cannot be correctly shown in 'Apache Tomcat' Run Configuration

My environment is as below: 我的环境如下:
Eclipse: Luna Service Release 1 (4.4.1) -- Build id: 20140925-1800 Eclipse:Luna Service Release 1(4.4.1)-内部版本:20140925-1800
Gradle IDE: 3.6.3.201411271013-RELEASE Gradle IDE:3.6.3.201411271013-发布

I have one project 'webapp' with gradle dependencies. 我有一个带有gradle依赖项的项目“ webapp”。 If I create one 'Java Application' Run configuration, the "Gradle Dependencies" could be correctly displayed, and also be effective. 如果我创建一个“ Java应用程序”运行配置,则“ Gradle Dependencies”可能正确显示,并且也有效。 See below pictures: 看下面的图片:
好

If I create one 'Apache Tomcat' Run Configuration to add the 'webapp' project in 'Classpath' tab, then the "Gradle Dependencies" couldn't be correctly displayed, and also not effective. 如果我创建一个“ Apache Tomcat”运行配置以在“类路径”选项卡中添加“ webapp”项目,则“ Gradle Dependencies”将无法正确显示,并且也将无效。 See below pictures: 看下面的图片:
坏

Normally, I need to manually add all those gradle-dependencies jars in the 'Classpath' tab to solve the "ClassNotFoundException". 通常,我需要在“ Classpath”选项卡中手动添加所有这些gradle-dependencies jar,以解决“ ClassNotFoundException”。 Like this: 像这样:
手册

However, it's not convenient. 但是,这并不方便。
Does anyone meet the same problem? 有人遇到同样的问题吗? Thanks. 谢谢。

使用Gradle eclipse-wtp插件生成Eclipse项目,然后将生成的项目导入Eclipse应该可以解决此问题:

gradle cleanEclipse eclipse eclipseWtp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM