-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec.sh
More file actions
executable file
·35 lines (31 loc) · 908 Bytes
/
exec.sh
File metadata and controls
executable file
·35 lines (31 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#
# Starting up java application by getting and setting
# environement variables and dynamically runtime dependencies.
#
# Make sure your taught build.gradle.kts the following lines:
#
# tasks.register("printRuntimeClasspath") {
# println(sourceSets.main.get().runtimeClasspath.asPath)
# }
#
# Christian (graetz23@gmail.com)
#
# created 220226
# updated 260226
#
# Configure these two lines to your needs:
#
JARPATH="./build/libs/pax-1.0.0.jar:"
CLASSPATH="de.graetz23.pax.Main"
#
# No need to change things, unless those got improved.
#
echo "building application .."
GRDLW=$(./gradlew clean jar 2>&1 | tee .logBuild)
echo "retrieving runtime dependencies .."
DEPSFILE=".runtimeClasspaths"
RNTMDEPS=$(./gradlew printRuntimeClasspath | head -n 1)
echo $RNTMDEPS > $DEPSFILE
echo "starting application .."
RUNSERVICE=$(java -cp $JARPATH:$(cat $DEPSFILE) $CLASSPATH 2>&1 | tee .logService)