title: JavaFX maven assembly warning: "Cannot include project artifact ... it doesn't have an associated file or directory"
body: <p>In an attempt to create an executable jar from a JavaFX Maven-based project running Java 1.8.0_121, I was using the command: <code>mvn clean assembly:single</code>.
  During the process, the following warning is printed:</p>
  
  <pre><code>[WARNING] Cannot include project artifact: groupid:artifactid:jar:1.0-SNAPSHOT; it doesn't have an associated file or directory.
  </code></pre>
  
  <p>The resulting jar file was built but it could not be executed. When running <code>java -jar product.jar</code>, the following error was being printed:</p>
  
  <pre><code>Error: Could not find or load main class groupid.artifactid.MainClass
  </code></pre>
  
  <p>The pom file:</p>
  
  <pre><code>&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;groupid&lt;/groupId&gt;
      &lt;artifactId&gt;artifactid&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;organization&gt;
          &lt;name&gt;org&lt;/name&gt;
      &lt;/organization&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
      &lt;build&gt;
          &lt;finalName&gt;product&lt;/finalName&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;3.0.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;descriptorRefs&gt;
                          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                      &lt;/descriptorRefs&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;mainClass&gt;groupid.artifactid.MainClass&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                      &lt;finalName&gt;product&lt;/finalName&gt;
                      &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I double checked that there is a class named <code>MainClass.java</code> with a <code>psvm</code> entry point in the package structure <code>groupid/artifactid/</code>. Why is this happening and how can it be resolved?</p>