there's nothing that really painlessly replaced the first
maven fatjar since it became outmoded.
that said, i use dependency plugin to dump a lib/ dir even for reactor
builds, and then a shell script that uses that classpath syntax to load a
directory at a time.
this happens with maven exec anyways, just less fragile.
sometimes shade chokes on a manifest glitch and in practice fixing that is
less efficient than a robust lib/ dir
in the parent-most pom if the levels go deeper, verbatim from the
dependency plugin docs, is
```!xml
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
```
in bin/ of the top level i have the tiniest specific bash runner, easily
ported to windows as well.
```!bash
#!/usr/bin/env bash
set -fx
JDIR=$(dirname $0)/../apprunner
exec java -classpath "$JDIR/target/*:$JDIR/target/lib/*"
${EXECMAIN:=apprunner.MyMain} "$@"
```
often it's a helpful thing to keep these shell scripts handy to record
variaous -XX and -D parameters in the comments or at run time.