angularmavenwarglassfish-4rest

Packaging an Angular project as a webapp with Maven


Here's a bit of a strange question : I have an Angular project that talks to a Restful Java application. I was looking for help to package it as a Maven webapp project which can then generate/build a WAR file. Is that something that can me done easily in Maven? So far I created a bare bones app using the 'maven-archetype-webapp' archtype but not entirely sure if the Angular will play nice. The goal was to take the Angular UI and deploy it on some legacy servers (like GlassFish, IBM Websphere AS 9.0 etc.) so that it works like a regular client application. Any help is greatly appreciated.


Solution

  • I've done something similar with a Vue and Dropwizard based project, set up like so:

    The details may differ slightly based on the best way to serve assets under Glassfish/Websphere/etc and the angular build process, but the above approach should be adaptable to those details.