title: Kotlin + Maven assembling: no main manifest attribute
body: <p><strong>I have problem assembling Kotlin project with some dependencies to JAR file using Maven.</strong></p>
  
  <p>How am i assembling project to JAR:</p>
  
  <pre><code>RightPanel -&gt; MavenProjects -&gt; Lifecycle -&gt; package -&gt; run
  </code></pre>
  
  <p>When i running JAR file:</p>
  
  <pre><code>java -jar path.jar
  </code></pre>
  
  <p>I'm getting following error:</p>
  
  <pre><code>no main manifest attribute, in path.jar
  </code></pre>
  
  <p>I've added  <code>maven-assembly-plugin</code> like <a href="https://kotlinlang.org/docs/reference/using-maven.html" rel="nofollow noreferrer">here</a>:</p>
  
  <p><strong>So my plugins directory looks like this:</strong></p>
  
  <pre><code>&lt;build&gt;
      &lt;sourceDirectory&gt;src/main/kotlin&lt;/sourceDirectory&gt;
      &lt;testSourceDirectory&gt;src/test/kotlin&lt;/testSourceDirectory&gt;
  
      &lt;plugins&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;make-assembly&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt; &lt;goal&gt;single&lt;/goal&gt; &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;archive&gt;
                              &lt;manifest&gt;
                                  &lt;mainClass&gt;${main.class}&lt;/mainClass&gt;
                              &lt;/manifest&gt;
                          &lt;/archive&gt;
                          &lt;descriptorRefs&gt;
                              &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                          &lt;/descriptorRefs&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.jetbrains.kotlin&lt;/groupId&gt;
              &lt;artifactId&gt;kotlin-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${kotlin.version}&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;compile&lt;/id&gt;
                      &lt;phase&gt;compile&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;test-compile&lt;/id&gt;
                      &lt;phase&gt;test-compile&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;test-compile&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p><code>main.class</code> property defined here:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;kotlin.version&gt;1.1.51&lt;/kotlin.version&gt;
      &lt;junit.version&gt;4.12&lt;/junit.version&gt;
      &lt;main.class&gt;ru.icarumbas.main.HelloKt&lt;/main.class&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p><strong>Some facts:</strong></p>
  
  <ul>
  <li><code>Hello.kt</code> is starter class and it has fun <code>main(...){}</code></li>
  <li>When i unarchive JAR it has META-INF folder.</li>
  </ul>
  
  <p><strong>Versions:</strong></p>
  
  <ul>
  <li>Platform: Mac OS </li>
  <li>Kotlin version: 1.1.51</li>
  <li>Maven version: 4.0.0</li>
  </ul>
  
  <p>Maybe i'm missing something. I've already looked on a lot of questions alike this, and they didn't help me. So please don't mark this as duplicate and write a comment if you want to see more code. I didn't show my full <code>pom.xml</code> file so write me if you want to see it full.</p>