I am complete new to gradle and have so far made a working gradle installation on my machine and installed the Eclipse gradle plugin (buildship).
Now i would like to create a gradle project with the structure file of Eclipse’s Dynamic Web Project
that also adds
deployment descriptor
Dynamic web module version
Tomcat library
With more
Please see image for file and folder structure example of new project
How can i do this?
What i was initially trying to accomplish when i was suggested to use gradle was to have an easy way to add dependencies such as oAuth to a web project.
I tried to see the https://guides.gradle.org/building-java-web-applications/ guide, but this removes the entire structure that i am used to and i also had other issues i could not figure out how to get past so i ended up with a non working project that could not display the index.html page and instead showed a “Directory: project/path” H1 element from Jetty?
Thanks in advance
For others that stumple upon this.
I have learned that it’s not possible to have the Eclipse Dynamic Web Project file and folder structure.
So i created the structure as follows
src
main
java
resources
webapp
META-INF
WEB-INF
web.xml
lib
With the following build.gradle file
apply plugin: 'java’
apply plugin: 'war’
apply plugin: 'eclipse-wtp’
apply plugin: ‘com.bmuschko.tomcat’