Skip to content

Commit

Permalink
Merge pull request roclas#2 from chaserb/singlejar
Browse files Browse the repository at this point in the history
Add manifest and dependencies to make jar directly executable
  • Loading branch information
roclas committed Dec 16, 2014
2 parents 82ec6f3 + 8acaf9d commit 5c41d1a
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<version>4.11</version>
</dependency>
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
<version>1.1.1</version>
</dependency>
</dependencies>
<build>
Expand All @@ -32,10 +32,34 @@
<configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.roclas.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>

0 comments on commit 5c41d1a

Please sign in to comment.