title: Maven pom.xml change manifest mainclass
body: <p>I'm working on a project where I have gotten a sample code that is build with Maven. In the pom.xml there is</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.3&lt;/version&gt;
      &lt;configuration&gt;
          &lt;archive&gt;
              &lt;manifest&gt;
                  &lt;mainClass&gt;com.xxx.research.control.ControlClass&lt;/mainClass&gt;
                  &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                  &lt;classpathPrefix&gt;lib/&lt;/classpathPrefix&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;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;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Now I have written my own code and I am trying to reuse this pom since I'm new to maven. I have tried to change <code>&lt;mainClass&gt;com.xxx.research.control.Main&lt;/mainClass&gt;</code> to <code>&lt;mainClass&gt;project.Main&lt;/mainClass&gt;</code> because thats where my code is. In Eclipse I have it in the sam source folder but in a package "project".</p>
  
  <p>When I do maven clean install with the original pom I can run the jar that it produces just fine but when I modify it to build my code I get <code>Exception in thread "main" java.lang.NoClassDefFoundError: project/Main</code>.</p>
  
  <p>What am I missing here?</p>
  
  <p>Thanks in advance.</p>