How to Build Angular 8 Project as War File

I would like to know how to build the angular app to .war file so that i can deploy to WAS server using maven

This Post Has One Comment

  1. No Fault

    You can do this with maven by creating a build plugin for executing the build of angular application. Build plugins will be executed during the build and they should be configured in the element from the POM.

    org.codehaus.mojo
    exec-maven-plugin

    npm install

    exec

    install

    npm

    install

    npm build

    exec

    install

    npm

    run
    build

    It is important for you to have already installed the node js, npm before. If not the maven build will fail because it will not find the environment need to run a build of angular app.

    After that we modify the maven-war-plugin. The directory that we specify below will be location angular app in war generated by maven build.

    plugin>
    org.apache.maven.plugins
    maven-war-plugin

    false

    resources
    false

    ../path when you want to put angular app /dist/

    **/*.*

    </resource

Leave a Reply