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.
我有一个问题——命令“gradle eclipse”生成必要的eclipse WTP文件。我可以将项目导入Eclipse,但是当我部署到Glassfish时,它不会将任何内容复制到Glassfish的eclipseApp目录。
I verified that the project is a Dynamic Web Facet but it still doesn't work.
我验证了这个项目是一个动态的Web方面,但是它仍然不起作用。
Any help would be greatly appreciated.
如有任何帮助,我们将不胜感激。
Thanks
谢谢
2 个解决方案
#1
1
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.
动态Web方面是一回事,但是当gradle生成项目文件时,它不知道您将使用什么应用服务器。进入项目属性-> facet ->动态Web ->运行时,然后配置GF实例或链接它。
You might have already done it but that's my 2 cents about what's wrong.
你可能已经做过了,但这是我的2分。
#2
1
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.
显然,您正在使用eclipse插件来实现这一点。下面是您可以进一步做的,以确保gradle cleanEclipse和gradle eclipse能够继续在您的项目中发挥作用。
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
观察在.project文件中需要哪些属性和构建命令。一旦您知道了所有这些,接下来要做的就是像这样配置eclipse任务
apply plugin: 'eclipse'
eclipse {
project {
name = 'eclipse-appname'
natures << 'org.eclipse.jdt.groovy.core.groovyNature'
buildCommand 'org.eclipse.....Validator'
buildCommand 'org.eclipse.jdt.core.javabuilder'
}
}
I have added natures and build commands randomly, replace with the appropriate ones that you see in your .project.
我已经随机添加了属性和构建命令,替换为您在.project中看到的适当命令。
#1
1
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.
动态Web方面是一回事,但是当gradle生成项目文件时,它不知道您将使用什么应用服务器。进入项目属性-> facet ->动态Web ->运行时,然后配置GF实例或链接它。
You might have already done it but that's my 2 cents about what's wrong.
你可能已经做过了,但这是我的2分。
#2
1
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.
显然,您正在使用eclipse插件来实现这一点。下面是您可以进一步做的,以确保gradle cleanEclipse和gradle eclipse能够继续在您的项目中发挥作用。
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
观察在.project文件中需要哪些属性和构建命令。一旦您知道了所有这些,接下来要做的就是像这样配置eclipse任务
apply plugin: 'eclipse'
eclipse {
project {
name = 'eclipse-appname'
natures << 'org.eclipse.jdt.groovy.core.groovyNature'
buildCommand 'org.eclipse.....Validator'
buildCommand 'org.eclipse.jdt.core.javabuilder'
}
}
I have added natures and build commands randomly, replace with the appropriate ones that you see in your .project.
我已经随机添加了属性和构建命令,替换为您在.project中看到的适当命令。