Java Reference
In-Depth Information
--driverClass org.postgresql.Driver \
--databaseTables users
After completing the persistence layer, we will now create the GUI application using the
scaffold command, which can be associated with several providers such as the Angu-
larJS one. First, let's install the add-on using the following shell command (note that it
should be executed in your system's shell, not in the Forge CLI):
forge --install org.jboss.forge.addon:angularjs
After the installation is complete, we need to issue three more commands. First, we will
prepare the scaffolding framework:
[forge-demo]$ scaffold-setup --provider AngularJS
Our application now is a web app with AngularJS libraries. Next, we will define that we
would like to generate a UI for the Users entity:
[forge-demo]$ scaffold-generate --provider AngularJS
--targets com.packtpub.wflydevelopment.appendix.model.Users
Finally, we create an JAX-RS endpoint:
[forge-demo]$ rest-generate-endpoints-from-entities
--targets com.packtpub.wflydevelopment.appendix.model.Users
And we are done! The application is now a complete Java EE application with REST end-
points, JPA, and an AngularJS UI.
When these samples were written, JBoss Forge did not fully support all Java EE 7 depend-
encies. This can be fixed by manually modifying the pom.xml file of the generated pro-
ject. You should just remove all the dependencies besides the one shown in the following
code snippet:
Search WWH ::

Custom Search