I started a Java Web App back in NB 8.2 which by default used Ant.

Once I started using GitLab CI for the project, I created a build.gradle 
file, which just fires off the ant build:

ant.importBuild('build.xml') { antTargetName ->
     'a-' + antTargetName
}

and then defines my dependencies, war file info, etc.

Now that I'm using NB11, NB detects the build.gradle file and assumes 
this is a Gradle project. I'm fine with that, but obviously there are 
things I'm going to need to do to the structure of my 
project/build.gradle file to actually work with the project.

Specifically, my "Web Pages" directory no longer appears in the Project 
view. I presume this is because I need to adhere to Gradle's assumed 
location of the web or webapp directory or tell Gradle what that path is 
in my build.gradle, but I have been unable to figure out the settings to 
do this.

I've tried to use the info in Gradle docs, but I haven't been successful:

https://docs.gradle.org/current/userguide/war_plugin.html

I did notice that if you were to create a new project, "Java with 
Gradle" does not include "Web Application" as a project like "Java with 
Maven" and "Java with Ant -> Java Web" do.

I'm assuming that in NetBeans, I should be able to manually convert an 
existing Web App project to a Gradle Web App project?

If so, do I need to convert all the Ant stuff to Gradle? Or, at least in 
the short run is there a way to tell NB to ignore the existence of 
build.gradle and just let me open it up as an Ant Java Web App?

I have been Googling around and I haven't found anything obvious yet. If 
anyone knows of existing resources for figuring this out, please let me 
know.

Thanks!

-Mike

Reply via email to