Skip to content

Instantly share code, notes, and snippets.

@kyberorg
Last active January 4, 2016 01:19
Show Gist options
  • Save kyberorg/8547475 to your computer and use it in GitHub Desktop.
Save kyberorg/8547475 to your computer and use it in GitHub Desktop.
POM with exec JAR
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>net.virtalab</groupId>
<artifactId>simpleapp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>simpleapp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>net.virtalab.simpleapp.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment