title: Maven adding mainClass in pom.xml with the right folder path
body: <p>I want to get a working jar file with my maven project.</p>
  
  <p>The build part is:</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.14&lt;/version&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.puppycrawl.tools&lt;/groupId&gt;
                      &lt;artifactId&gt;checkstyle&lt;/artifactId&gt;
                      &lt;version&gt;6.4.1&lt;/version&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
              &lt;configuration&gt;
                  &lt;consoleOutput&gt;true&lt;/consoleOutput&gt;
                  &lt;configLocation&gt;${basedir}/src/test/resources/checkstyle_swt1.xml&lt;/configLocation&gt;
              &lt;/configuration&gt;
          &lt;/plugin&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.4&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;descriptor&gt;src/assembly/src.xml&lt;/descriptor&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&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;
  
      &lt;/plugins&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&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.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addDefaultImplementationEntries&gt;true&lt;/addDefaultImplementationEntries&gt;
                              &lt;addDefaultSpecificationEntries&gt;true&lt;/addDefaultSpecificationEntries&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                              &lt;mainClass&gt;org.jis.Main&lt;/mainClass&gt;                                
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>So my problem right now is that I don'T know how to implement the mainclass properly into my pom.xml and later into my jar file.
  The Folder Structure is: src/main/java/org/jis/Main.java
  but if I add the following line</p>
  
  <pre><code>&lt;mainClass&gt;src.main.java.org.jis.Main&lt;/mainClass&gt;
  </code></pre>
  
  <p>it doesn't work.</p>
  
  <p>Thanks in advance</p>