When I wanted to generate a RESTful Webservice with Netbeans I was asked for “the way REST resources will be registered in the application”. I accidentally clicked on “Netbeans will generate a subclass of javax.ws.rs.core.Application […]” instead of “Create default Jersey REST servlet adaptor […]” (see image below).

Source: Getting Started with RESTful Web Services
I deleted the generated subclass and created the Jersey REST servlet adaptor manually. Everything works fine, except that Netbeans is still generating a subclass of Application on every publish. Do you know a way how to switch this off? (I do not get the dialog a second time.)
I had to remove the file
Then I got some import/dependency errors when compiling. After solving these (removed the import from another xml and a dependency to
generate-rest-configfrom build-impl.xml) it wasn’t generating a subclass of Application anymore.