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
Open Eclipse and go to Run -> Debug Configurations.... Select the Remote Java Application in the list of configuration types on the left. Click the New toolbar button. In the Project field of the Connect tab, type or browse to select the project to use as a reference for the launch (for source lookup).
A Java program can be debugged simply by right clicking on the Java editor class file from Package explorer. Select Debug As → Java Application or use the shortcut Alt + Shift + D, J instead. Either actions mentioned above creates a new Debug Launch Configuration and uses it to start the Java application.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With