With all due respect, this is horrible. It is not just a scripted build
and like Ant through the back door, but also shell- and
platform-specific (unless you happen to have Git Bash or so installe on
Windows).

Furthermore, it does not even relate to my question.

-- 
Alexander Kriegisch
https://scrum-master.de

Jim N schrieb am 25.04.2021 16:45 (GMT +07:00):

> 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.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to