Add external jars to runnable jar’s manifest file using maven

Add external jars to runnable jar MANIFEST.MF file using maven

Also package project as a runnable jar with the specified main class

<plugin><!-- Set Main class and location of jars to add to the manifest classpath -->
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <archive>
            <manifestEntries><!-- Add manifest Classpath entries that aren't managed by maven -->
              <Class-Path>lib/pojoxml-1.0.jar lib/lwjgl.jar lib/jorbis-0.0.15.jar lib/jogg-0.0.7.jar lib/natives-win32.jar lib/slick.jar</Class-Path>
            </manifestEntries>
            <manifest>
              <addClasspath>true</addClasspath>
              <classpathPrefix>lib</classpathPrefix>
              <mainClass>com.porto.game.game2d.GameMain</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
      </plugin>