Look at the screenshot in yesterday's blog entry. It shows a very basic Java EE 8 MVC project structure. Now imagine you need to create tools to support those who will be creating those kinds of project structures. For NetBeans IDE, there are several approaches you can take:
I took the third approach above and it works. You can add your own files into the iterator and, as you can see above, the only downside is that you're depending on implementation code here and there.
In the above, notice "MVCSettingsWizardPanel", this is an additional panel added on to the end of the wizard, i.e., in addition to the standard Maven web application panels, for the settings that are relevant to MVC projects, e.g., to let the user provide the names of the MVC artifacts that will be created.
Near the end of the above, you see this statement, which works, i.e., I can add my own files into the process. Ultimately, once I know which exact artifacts are needed, I can change the below with the names of the files that need to be created, e.g., from Freemarker templates those can be created, same as for all other files created via templates in NetBeans IDE:
The module described in this blog entry looks like this, i.e., I now have a framework for creating my own custom new Maven-based web applications:
Best would be if the project template were to be an official Maven Archetype that could be accessed via the "Project from Archetype" wizard. But a downside to that approach would be that it is a generic wizard, i.e., the MVC-specific artifacts can't be defined in that wizard and would simply be generated into the right places in the structure. What I'm trying to achieve, instead of that, is a way to let the user customize the basic artifacts of the project prior to their creation and the above approach makes that possible.