在Eclipse上调试Gradle生成的项目
我有一个问题 - 命令“gradle eclipse”生成必要的 Eclipse WTP 文件。我可以将项目导入到 Eclipse 中,但是当我部署到 Glassfish 时,它不会将任何内容复制到 Glassfish 的 eclipseApp 目录中。
我验证该项目是 Dynamic Web Facet,但它仍然无法工作。
任何帮助将不胜感激。
谢谢
I have an issue - the command "gradle eclipse" generates the necessary Eclipse WTP files. I can import the project into Eclipse, but when I deploy to Glassfish it does not copy anything to Glassfish's eclipseApp
directory.
I verified that the project is a Dynamic Web Facet but it still doesn't work.
Any help would be greatly appreciated.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,这是一个非常常见的问题。通常,当您使用一个构建器为您生成项目文件,甚至使用自定义插件来检测更改事件时,请使用自定义脚本重建您的应用程序并将其热部署到您的应用程序服务器。
Dynamic Web Facet 是一回事,但是当 gradle 生成项目文件时,它不知道您将使用哪个应用程序服务器。
进入项目属性->刻面->动态网页 ->运行时,然后配置您的 GF 实例或链接它。
你可能已经做到了,但这就是我对问题所在的 2 美分。
Yes this is a very common issue. Typically, when you use one builder to generate project files for you, or even a custom plug-in to detect change events, rebuild your app with a custom script and hot-deploy it to your app server.
The Dynamic Web Facet is one thing, but when gradle generates your project file, it does not know what app server you will be using.
Go into Project Properties -> Facets -> Dynamic Web -> Runtimes and then configure your GF instance or link it.
You might have already done it but that's my 2 cents about what's wrong.
显然你正在使用 eclipse 插件来做到这一点。您可以进一步执行以下操作,以确保 gradle cleanEclipse 和 gradle eclipse 继续在您的项目中良好运行。
观察 .project 文件中需要哪些性质和构建命令。一旦您了解了所有这些,接下来要做的就是配置 Eclipse 任务,就像
我随机添加的性质和构建命令一样,替换为您在 .project 中看到的相应命令。
Obviously you are using eclipse plugin to do so. Here is what you can do further to ensure gradle cleanEclipse and gradle eclipse continue to play nice with your project.
Watch what natures and build Commands are required in your .project file. Once you are aware of them all, the next thing to do is configure the eclipse task like so
I have added natures and build commands randomly, replace with the appropriate ones that you see in your .project.