title: How to run maven web application through cmd
body: <p>I am a newbie in making web application development and I'm trying to make a website that plays video using embedded Tomcat and maven. I have only one static jsp file and I can run the program on intellij on localhost but I am finding extreme difficulties to run this project in cmd with the command line (mvn exec). My main goal is to run this program on a server I rented and then using the domain name I registered to access the website. Here is my pom.xml file</p>
  
  <p>pom.xml</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
   &lt;project xmlns="http://maven.apache.org/POM/4.0.0" 
  
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  
   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;maven.movie.com&lt;/groupId&gt;
  
   &lt;artifactId&gt;movieweb&lt;/artifactId&gt;
  
   &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
   &lt;packaging&gt;war&lt;/packaging&gt;
  
   &lt;name&gt;movieweb Maven Webapp&lt;/name&gt;
   &lt;!-- FIXME change it to the project's website --&gt;
   &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  &lt;properties&gt;
   &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
   &lt;maven.compiler.source&gt;1.7&lt;/maven.compiler.source&gt;
   &lt;maven.compiler.target&gt;1.7&lt;/maven.compiler.target&gt;
   &lt;tomcat.version&gt;8.5.23&lt;/tomcat.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;junit&lt;/groupId&gt;
    &lt;artifactId&gt;junit&lt;/artifactId&gt;
    &lt;version&gt;4.11&lt;/version&gt;
    &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
    &lt;artifactId&gt;tomcat-embed-core&lt;/artifactId&gt;
    &lt;version&gt;${tomcat.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
    &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
    &lt;version&gt;${tomcat.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;
    &lt;artifactId&gt;tomcat-jasper&lt;/artifactId&gt;
    &lt;version&gt;${tomcat.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;
    &lt;artifactId&gt;tomcat-jasper-el&lt;/artifactId&gt;
    &lt;version&gt;${tomcat.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;
    &lt;artifactId&gt;tomcat-jsp-api&lt;/artifactId&gt;
    &lt;version&gt;${tomcat.version}&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
    &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.6.0&lt;/version&gt;
    &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
    &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
    &lt;version&gt;2.5&lt;/version&gt;
    &lt;scope&gt;provided&lt;/scope&gt;
  
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
    &lt;artifactId&gt;javax.servlet.jsp-api&lt;/artifactId&gt;
    &lt;version&gt;2.3.1&lt;/version&gt;
    &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;javax.el&lt;/groupId&gt;
    &lt;artifactId&gt;javax.el-api&lt;/artifactId&gt;
    &lt;version&gt;3.0.0&lt;/version&gt;
    &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;javax.servlet.jsp.jstl&lt;/groupId&gt;
    &lt;artifactId&gt;javax.servlet.jsp.jstl-api&lt;/artifactId&gt;
    &lt;version&gt;1.2.1&lt;/version&gt;
    &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p></p>
  
  <p>
      movieweb
      
        </p>
  
  <pre><code>    &lt;plugin&gt;
        &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
        &lt;version&gt;3.0.0&lt;/version&gt;
      &lt;/plugin&gt;
      &lt;!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging --&gt;
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
        &lt;version&gt;3.0.2&lt;/version&gt;
      &lt;/plugin&gt;
  
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
        &lt;version&gt;3.7.0&lt;/version&gt;
      &lt;/plugin&gt;
  
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.20.1&lt;/version&gt;
      &lt;/plugin&gt;
  
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
        &lt;version&gt;3.2.0&lt;/version&gt;
      &lt;/plugin&gt;
  
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.5.2&lt;/version&gt;
      &lt;/plugin&gt;
  
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.8.2&lt;/version&gt;
      &lt;/plugin&gt;
  
      &lt;plugin&gt;
        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
        &lt;artifactId&gt;appassembler-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.0.0&lt;/version&gt;
        &lt;configuration&gt;
          &lt;assembleDirectory&gt;target&lt;/assembleDirectory&gt;
          &lt;programs&gt;
            &lt;program&gt;
              &lt;mainClass&gt;launch.Main&lt;/mainClass&gt;
              &lt;name&gt;webapp&lt;/name&gt;
            &lt;/program&gt;
          &lt;/programs&gt;
        &lt;/configuration&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;phase&gt;package&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;assemble&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
  
      &lt;plugin&gt;
        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
        &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;1.6.0&lt;/version&gt;
        &lt;configuration&gt;
          &lt;mainClass&gt;launch.Main&lt;/mainClass&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
  
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.4&lt;/version&gt;
        &lt;configuration&gt;
          &lt;archive&gt;
            &lt;manifest&gt;
              &lt;mainClass&gt;launch.Main&lt;/mainClass&gt;
            &lt;/manifest&gt;
          &lt;/archive&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
  
    &lt;/plugins&gt;
  &lt;/pluginManagement&gt;
  </code></pre>
  
  <p>
  </p>