title: Angular WAR build
body: <p>I would like to build Angular 5 app to .war and deploy and run it from JBoss.</p>
  
  <p>I have angular 5 app with maven for .war building. During the JBoss deployment there is an error but I can deploy after making WebContent catalog in WEB-INF but can't reach the site. I am not sure if my POM/WEB.XML are configured properly. </p>
  
  <p>I am building using <strong>mvn compile war:war</strong></p>
  
  <p>I have no experience with Maven so if you could help me I would be very grateful.</p>
  
  <p>POM.XML</p>
  
  <pre><code> &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.vdb&lt;/groupId&gt;
  &lt;artifactId&gt;vdb&lt;/artifactId&gt;
  &lt;version&gt;0.0.1&lt;/version&gt;
  
  &lt;build&gt;
   &lt;plugins&gt;
  
     &lt;plugin&gt;
       &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
       &lt;version&gt;2.5&lt;/version&gt;
       &lt;configuration&gt;
         &lt;filesets&gt;
           &lt;fileset&gt;
             &lt;directory&gt;dist&lt;/directory&gt;
             &lt;includes&gt;
               &lt;include&gt;*&lt;/include&gt;
             &lt;/includes&gt;
           &lt;/fileset&gt;
         &lt;/filesets&gt;
       &lt;/configuration&gt;
     &lt;/plugin&gt;
  
     &lt;plugin&gt;
       &lt;groupId&gt;com.github.eirslett&lt;/groupId&gt;
       &lt;artifactId&gt;frontend-maven-plugin&lt;/artifactId&gt;
       &lt;version&gt;1.5&lt;/version&gt;
       &lt;executions&gt;
         &lt;execution&gt;
           &lt;id&gt;install node and npm&lt;/id&gt;
           &lt;goals&gt;
             &lt;goal&gt;install-node-and-npm&lt;/goal&gt;
           &lt;/goals&gt;
           &lt;configuration&gt;
             &lt;nodeVersion&gt;v8.9.1&lt;/nodeVersion&gt;
             &lt;npmVersion&gt;5.5.1&lt;/npmVersion&gt;
           &lt;/configuration&gt;
         &lt;/execution&gt;
  
         &lt;execution&gt;
           &lt;id&gt;npm install&lt;/id&gt;
           &lt;goals&gt;
             &lt;goal&gt;npm&lt;/goal&gt;
           &lt;/goals&gt;
           &lt;configuration&gt;
             &lt;arguments&gt;install&lt;/arguments&gt;
           &lt;/configuration&gt;
         &lt;/execution&gt;
  
         &lt;execution&gt;
           &lt;id&gt;prod&lt;/id&gt;
           &lt;goals&gt;
             &lt;goal&gt;npm&lt;/goal&gt;
           &lt;/goals&gt;
           &lt;configuration&gt;
             &lt;arguments&gt;run-script prod&lt;/arguments&gt;
           &lt;/configuration&gt;
           &lt;phase&gt;generate-resources&lt;/phase&gt;
         &lt;/execution&gt;
       &lt;/executions&gt;
     &lt;/plugin&gt;
  
      &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.6&lt;/version&gt;
          &lt;configuration&gt;
              &lt;webXml&gt;.\WEB-INF\web.xml&lt;/webXml&gt;   
              &lt;webResources&gt;
                  &lt;resource&gt;
                      &lt;!-- this is relative to the pom.xml directory --&gt;
                      &lt;directory&gt;./dist/&lt;/directory&gt;
                  &lt;/resource&gt;
              &lt;/webResources&gt;
          &lt;/configuration&gt;
  
      &lt;/plugin&gt;
  
   &lt;/plugins&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>and WEB.XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;&lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  version="2.4"&gt;
  
  &lt;display-name&gt;VDB WebApp&lt;/display-name&gt;
  &lt;description&gt;
  &lt;/description&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;VDBWeb&lt;/servlet-name&gt;
      &lt;servlet-class&gt;vdb.Servlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;VDBServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/vdb&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>   </p>