title: "no main manifest attribute, in server.war" not using a main class
body: <p>What I'm trying to do is have Docker run a TomEE 8.0.0 application with Maven. However when compiling the application, it gives me the error from the title <code>no main manifest attribute, in server.war</code>.</p>
  <p>pom.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;org.example&lt;/groupId&gt;
      &lt;artifactId&gt;server&lt;/artifactId&gt;
      &lt;version&gt;0.1-SNAPSHOT&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;maven.compiler.source&gt;12&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;12&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.tomee.maven&lt;/groupId&gt;
                  &lt;artifactId&gt;tomee-embedded-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;8.0.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;context&gt;ROOT&lt;/context&gt;
                      &lt;containerProperties&gt;
                          &lt;tomee.mp.scan&gt;true&lt;/tomee.mp.scan&gt;
                      &lt;/containerProperties&gt;
                  &lt;/configuration&gt;
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.apache.tomee&lt;/groupId&gt;
                          &lt;artifactId&gt;mp-common&lt;/artifactId&gt;
                          &lt;version&gt;8.0.0&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.10.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;8&lt;/source&gt;
                      &lt;target&gt;8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0.0&lt;/version&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.22.1&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;jitpack.io&lt;/id&gt;
              &lt;url&gt;https://jitpack.io&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.tomee&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
              &lt;version&gt;8.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.eclipse.microprofile&lt;/groupId&gt;
              &lt;artifactId&gt;microprofile&lt;/artifactId&gt;
              &lt;version&gt;2.0&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;javax.json&lt;/groupId&gt;
                      &lt;artifactId&gt;javax.json.bind-api&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
                      &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
                      &lt;artifactId&gt;javax.ws.rs-api&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;javax.json&lt;/groupId&gt;
                      &lt;artifactId&gt;javax.json-api&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;javax.annotation&lt;/groupId&gt;
                      &lt;artifactId&gt;javax.annotation-api&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.myfaces.core&lt;/groupId&gt;
              &lt;artifactId&gt;myfaces-api&lt;/artifactId&gt;
              &lt;version&gt;2.3.6&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
              &lt;version&gt;8.0.1&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
              &lt;version&gt;4.5.13&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-M5&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  <p>I've tried the following solutions without avail</p>
  <ul>
  <li><a href="https://www.javatpoint.com/no-main-manifest-attribute" rel="nofollow noreferrer">https://www.javatpoint.com/no-main-manifest-attribute</a></li>
  <li><a href="http://www.skylit.com/javamethods/faqs/createjar.html" rel="nofollow noreferrer">http://www.skylit.com/javamethods/faqs/createjar.html</a></li>
  <li><a href="https://stackoverflow.com/questions/9689793/cant-execute-jar-file-no-main-manifest-attribute">Can&#39;t execute jar- file: &quot;no main manifest attribute&quot;</a></li>
  </ul>
  <p>My question is, because I'm not using any &quot;main&quot; class within the application, but have TomEE running the application, how can I include the manifest.mf correctly?</p>
  <p>Or, if this is not the case, how should I start the application, because currently I run the application with Docker through doing the following command</p>
  <blockquote>
  <p>ENTRYPOINT [&quot;java&quot;,&quot;-jar&quot;,&quot;server.war&quot;]</p>
  </blockquote>