I've been working on a Java
project and managing it using Maven
.
The project itself has a number of third party dependencies e.g Box2d
, OpenGL
..
When I run mvn package
the project's custom source code is packed into a .jar
and all it's dependencies are placed in a folder beside the .jar
called lib
.
A bin
folder is also created with a startup script for Windows
and *nix
platforms. (The assembly descriptor is below).
I'm wondering is this the best way to package this Java
based application? Does it lend well for public consuption?
Or would a single, uber.jar
be better? Which contains all dependencies in a 1 file.
<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>bin</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.build.directory}/${project.artifactId}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>/**</include>
</includes>
<excludes>
<exclude>bin/*</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${project.build.directory}/${project.artifactId}/bin</directory>
<lineEnding>keep</lineEnding>
<useDefaultExcludes>true</useDefaultExcludes>
<outputDirectory>bin</outputDirectory>
<includes>
<include>*</include>
</includes>
<fileMode>755</fileMode>
</fileSet>
</fileSets>
</assembly>