Skip to content

Commit fa9d54e

Browse files
committed
Update the tinystruct version to be 1.1.6.
1 parent a70b57b commit fa9d54e

File tree

3 files changed

+32
-18
lines changed

3 files changed

+32
-18
lines changed

bin/dispatcher

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,41 @@
11
#!/usr/bin/env sh
22
ROOT="$(pwd)"
3-
VERSION="1.1.4"
3+
VERSION="1.1.6"
44
cd "$(dirname "$0")" || exit
55
cd "../"
6+
# Navigate to the root directory
67
cd "$ROOT" || exit
8+
9+
# Java options initialization
710
JAVA_OPTS=""
11+
12+
# Arguments initialization
813
args=""
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
1826
done
27+
28+
# Check if the JAR file exists
1929
JAR_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
2539
java \
2640
$JAVA_OPTS \
2741
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/ \

bin/dispatcher.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
@rem ***************************************************************************
1616
@echo off
1717
set "ROOT=%~dp0..\"
18-
set "VERSION=1.1.4"
18+
set "VERSION=1.1.6"
1919
set "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 %*

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
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>

0 commit comments

Comments
 (0)