Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If I understand your problem correctly, your ZIP is correctly created, but the <code>my-app-0.0.1-SNAPSHOT</code> contained in it (as well as the JAR directly located in <code>target/</code> directory) does not include your main class in the <code>MANIFEST.MF</code> file?</p> <p>In fact, the <code>assembly</code> plugin is not dedicated to execute such a task. This is the task of the <a href="http://maven.apache.org/plugins/maven-jar-plugin/" rel="noreferrer">JAR plugin</a>, which provides a way to indicates, in the <code>MANIFEST.MF</code> <a href="http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Make" rel="noreferrer">the main class of your project</a>. You simply must <strong>add</strong> this configuration in your current <code>pom.xml</code>:</p> <pre><code>&lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt; ... &lt;configuration&gt; &lt;archive&gt; &lt;manifest&gt; &lt;addClasspath&gt;true&lt;/addClasspath&gt; &lt;mainClass&gt;my.app.MainClass&lt;/mainClass&gt; &lt;/manifest&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; </code></pre> <hr/> <p>Regarding your try to change the packaging of the project to a <code>pom</code> packaging: it was a bad idea ;) Indeed, the <code>pom</code> packaging is used for project without any other resources than the <code>pom.xml</code> itself. It is really useful for <code>pom.xml</code> that are defined as <a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance" rel="noreferrer">the parent of others projects</a>, or to <a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Aggregation" rel="noreferrer">aggregate multiples modules</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload