File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env sh
22ROOT=" $( pwd) "
3- VERSION=" 1.1.4 "
3+ VERSION=" 1.1.6 "
44cd " $( dirname " $0 " ) " || exit
55cd " ../"
6+ # Navigate to the root directory
67cd " $ROOT " || exit
8+
9+ # Java options initialization
710JAVA_OPTS=" "
11+
12+ # Arguments initialization
813args=" "
9- for arg
10- do
11- str=$( echo " $arg " | awk ' { string=substr($0, 0, 2); print string; }' )
12- if [ " $str " = " -D" -o " $str " = " -X" ]
13- then
14- JAVA_OPTS=$JAVA_OPTS " " $arg
15- else
16- args=$args " " $arg
17- fi
14+
15+ # Loop through each argument
16+ for arg; do
17+ # Extract the first two characters of the argument
18+ str=${arg: 0: 2}
19+
20+ # Check if it starts with '-D' or '-X'
21+ if [ " $str " = " -D" ] || [ " $str " = " -X" ]; then
22+ JAVA_OPTS=" $JAVA_OPTS $arg "
23+ else
24+ args=" $args $arg "
25+ fi
1826done
27+
28+ # Check if the JAR file exists
1929JAR_FILE=" $ROOT /lib/tinystruct-$VERSION -jar-with-dependencies.jar"
20- if [ ! -f " $JAR_FILE " ]; then
21- JAR_FILE=" "
22- else
23- JAR_FILE=$JAR_FILE " :"
24- fi
30+ [ -f " $JAR_FILE " ] && JAR_FILE=" $JAR_FILE :"
31+
32+ # Check if additional JAR files exist and add them to the classpath
33+ # shellcheck disable=SC2043
34+ for jar_file in " $ROOT " /lib/tinystruct-" $VERSION " .jar; do
35+ [ -f " $jar_file " ] && JAR_FILE=" $JAR_FILE$jar_file :"
36+ done
37+
38+ # Java execution
2539java \
2640$JAVA_OPTS \
2741-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/ \
Original file line number Diff line number Diff line change 1515@ rem ***************************************************************************
1616@ echo off
1717set " ROOT = %~dp0 ..\"
18- set " VERSION = 1.1.4 "
18+ set " VERSION = 1.1.6 "
1919set " classpath = %ROOT% target\classes:%ROOT% lib\*:%ROOT% WEB-INF\lib\*:%ROOT% WEB-INF\classes" :%classpath%
2020@ java -cp " %ROOT% target\classes;%ROOT% lib\tinystruct-%VERSION% -jar-with-dependencies.jar;%ROOT% lib\*;%ROOT% WEB-INF\lib\*;%ROOT% WEB-INF\classes;%USERPROFILE% \.m2\repository\org\tinystruct\tinystruct\%VERSION% \tinystruct-%VERSION% -jar-with-dependencies.jar" org.tinystruct.system.Dispatcher %*
Original file line number Diff line number Diff line change 2121 <dependency >
2222 <groupId >org.tinystruct</groupId >
2323 <artifactId >tinystruct</artifactId >
24- <version >1.1.4 </version >
25- <classifier >jar-with-dependencies</classifier >
24+ <version >1.1.6 </version >
25+ <!-- <classifier>jar-with-dependencies</classifier> -- >
2626 </dependency >
2727 <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
2828 <dependency >
You can’t perform that action at this time.
0 commit comments