Skip to content

Commit 5e7ebb2

Browse files
TrigtrigVietND96
andauthored
Allow adding custom external jars to classpath (#2726)
* feat: allow adding custom external jars to classpath * feat: allow adding custom external jars to classpath * Apply for all components Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> * Print all info at last Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> --------- Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com> Co-authored-by: Trigtrig <7973740+Trigtrig@users.noreply.github.com> Co-authored-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
1 parent 7b3d3ac commit 5e7ebb2

11 files changed

+124
-33
lines changed

‎Distributor/start-selenium-grid-distributor.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,18 @@ if [ ! -z "$SE_NEW_SESSION_THREAD_POOL_SIZE" ]; then
150150
fi
151151

152152
EXTRA_LIBS=""
153+
if [ -n "${SE_EXTRA_LIBS}" ]; then
154+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
155+
fi
153156

154157
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
155158
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
156-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
157-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
159+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
160+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
161+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
162+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
163+
fi
158164
echo "Tracing is enabled"
159-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
160165
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
161166
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
162167
fi
@@ -178,6 +183,10 @@ else
178183
echo "Tracing is disabled"
179184
fi
180185

186+
if [ -n "${EXTRA_LIBS}" ]; then
187+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
188+
fi
189+
181190
if [ -n "${SE_JAVA_HTTPCLIENT_VERSION}" ]; then
182191
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.httpclient.version=${SE_JAVA_HTTPCLIENT_VERSION}"
183192
fi

‎ENV_VARIABLES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,4 @@
144144
| SE_NODE_REGISTER_SHUTDOWN_ON_FAILURE | true | If this flag is enabled, the Node will shut down after the register period is completed. This is useful for container environments to restart and register again. If restarted multiple times, the Node container status will be CrashLoopBackOff | --register-shutdown-on-failure |
145145
| SE_NODE_RELAY_BROWSER_VERSION | | | |
146146
| SE_NODE_RELAY_ONLY | true | | |
147+
| SE_EXTRA_LIBS | | Extra jars to add to the classpath | --ext |

‎EventBus/start-selenium-grid-eventbus.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,18 @@ if [ "${SE_ENABLE_TLS}" = "true" ]; then
8080
fi
8181

8282
EXTRA_LIBS=""
83+
if [ -n "${SE_EXTRA_LIBS}" ]; then
84+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
85+
fi
8386

8487
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
8588
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
86-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
87-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
89+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
90+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
91+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
92+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
93+
fi
8894
echo "Tracing is enabled"
89-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
9095
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
9196
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
9297
fi
@@ -108,6 +113,10 @@ else
108113
echo "Tracing is disabled"
109114
fi
110115

116+
if [ -n "${EXTRA_LIBS}" ]; then
117+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
118+
fi
119+
111120
if [ -n "${SE_JAVA_HTTPCLIENT_VERSION}" ]; then
112121
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.httpclient.version=${SE_JAVA_HTTPCLIENT_VERSION}"
113122
fi

‎Hub/start-selenium-grid-hub.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,18 @@ if [ ! -z "${CONFIG_FILE}" ]; then
130130
fi
131131

132132
EXTRA_LIBS=""
133+
if [ -n "${SE_EXTRA_LIBS}" ]; then
134+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
135+
fi
133136

134137
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
135138
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
136-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
137-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
139+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
140+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
141+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
142+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
143+
fi
138144
echo "Tracing is enabled"
139-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
140145
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
141146
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
142147
fi
@@ -158,6 +163,10 @@ else
158163
echo "Tracing is disabled"
159164
fi
160165

166+
if [ -n "${EXTRA_LIBS}" ]; then
167+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
168+
fi
169+
161170
if [ -n "${SE_JAVA_HTTPCLIENT_VERSION}" ]; then
162171
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.httpclient.version=${SE_JAVA_HTTPCLIENT_VERSION}"
163172
fi

‎NodeBase/start-selenium-node.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,18 @@ if [ "$GENERATE_CONFIG" = true ]; then
129129
fi
130130

131131
EXTRA_LIBS=""
132+
if [ -n "${SE_EXTRA_LIBS}" ]; then
133+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
134+
fi
132135

133136
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
134137
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
135-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
136-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
138+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
139+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
140+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
141+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
142+
fi
137143
echo "Tracing is enabled"
138-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
139144
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
140145
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
141146
fi
@@ -157,6 +162,10 @@ else
157162
echo "Tracing is disabled"
158163
fi
159164

165+
if [ -n "${EXTRA_LIBS}" ]; then
166+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
167+
fi
168+
160169
if [ ! -z "${SE_BIND_HOST}" ]; then
161170
append_se_opts "--bind-host" "${SE_BIND_HOST}"
162171
fi

���NodeDocker/start-selenium-grid-docker.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,18 @@ echo "Selenium Grid Node Docker configuration: "
9797
cat "${CONFIG_FILE}"
9898

9999
EXTRA_LIBS=""
100+
if [ -n "${SE_EXTRA_LIBS}" ]; then
101+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
102+
fi
100103

101104
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
102105
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
103-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
104-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
106+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
107+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
108+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
109+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
110+
fi
105111
echo "Tracing is enabled"
106-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
107112
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
108113
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
109114
fi
@@ -125,6 +130,10 @@ else
125130
echo "Tracing is disabled"
126131
fi
127132

133+
if [ -n "${EXTRA_LIBS}" ]; then
134+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
135+
fi
136+
128137
if [ -n "${SE_JAVA_HTTPCLIENT_VERSION}" ]; then
129138
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.httpclient.version=${SE_JAVA_HTTPCLIENT_VERSION}"
130139
fi

‎Router/start-selenium-grid-router.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,18 @@ if [ ! -z "$SE_ROUTER_PASSWORD" ]; then
131131
fi
132132

133133
EXTRA_LIBS=""
134+
if [ -n "${SE_EXTRA_LIBS}" ]; then
135+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
136+
fi
134137

135138
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
136139
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
137-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
138-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
140+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
141+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
142+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
143+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
144+
fi
139145
echo "Tracing is enabled"
140-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
141146
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
142147
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
143148
fi
@@ -159,6 +164,10 @@ else
159164
echo "Tracing is disabled"
160165
fi
161166

167+
if [ -n "${EXTRA_LIBS}" ]; then
168+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
169+
fi
170+
162171
if [ -n "${SE_JAVA_HTTPCLIENT_VERSION}" ]; then
163172
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.httpclient.version=${SE_JAVA_HTTPCLIENT_VERSION}"
164173
fi

‎SessionQueue/start-selenium-grid-session-queue.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,18 @@ if [ ! -z "$SE_REGISTRATION_SECRET" ]; then
8484
fi
8585

8686
EXTRA_LIBS=""
87+
if [ -n "${SE_EXTRA_LIBS}" ]; then
88+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
89+
fi
8790

8891
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
8992
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
90-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
91-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
93+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
94+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
95+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
96+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
97+
fi
9298
echo "Tracing is enabled"
93-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
9499
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
95100
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
96101
fi
@@ -112,6 +117,10 @@ else
112117
echo "Tracing is disabled"
113118
fi
114119

120+
if [ -n "${EXTRA_LIBS}" ]; then
121+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
122+
fi
123+
115124
if [ -n "${SE_JAVA_HTTPCLIENT_VERSION}" ]; then
116125
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.httpclient.version=${SE_JAVA_HTTPCLIENT_VERSION}"
117126
fi

‎Sessions/start-selenium-grid-sessions.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,18 @@ if [ ! -z "${CONFIG_FILE}" ]; then
106106
fi
107107

108108
EXTRA_LIBS=""
109+
if [ -n "${SE_EXTRA_LIBS}" ]; then
110+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
111+
fi
109112

110113
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
111114
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
112-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
113-
EXTRA_LIBS="${EXTRA_LIBS}${EXTERNAL_JARS}"
115+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
116+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
117+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
118+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
119+
fi
114120
echo "Tracing is enabled"
115-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
116121
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
117122
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
118123
fi
@@ -135,13 +140,17 @@ else
135140
fi
136141

137142
if [ "${SE_SESSIONS_MAP_EXTERNAL_DATASTORE}" = "true" ]; then
143+
echo "External datastore for sessions map is enabled"
138144
EXTERNAL_JARS=$(</external_jars/.classpath_session_map.txt)
139-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
140-
EXTRA_LIBS="${EXTRA_LIBS}${EXTERNAL_JARS}"
145+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
146+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
147+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
148+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
149+
fi
141150
fi
142151

143152
if [ -n "${EXTRA_LIBS}" ]; then
144-
EXTRA_LIBS="--ext ${EXTRA_LIBS}"
153+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
145154
fi
146155

147156
cat "$CONFIG_FILE"

‎Standalone/start-selenium-standalone.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,18 @@ cat "${CONFIG_FILE}"
129129
echo "Starting Selenium Grid Standalone..."
130130

131131
EXTRA_LIBS=""
132+
if [ -n "${SE_EXTRA_LIBS}" ]; then
133+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
134+
fi
132135

133136
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
134137
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
135-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
136-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
138+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
139+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
140+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
141+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
142+
fi
137143
echo "Tracing is enabled"
138-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
139144
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
140145
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
141146
fi
@@ -157,6 +162,10 @@ else
157162
echo "Tracing is disabled"
158163
fi
159164

165+
if [ -n "${EXTRA_LIBS}" ]; then
166+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
167+
fi
168+
160169
CHROME_DRIVER_PATH_PROPERTY=-Dwebdriver.chrome.driver=/usr/bin/chromedriver
161170
EDGE_DRIVER_PATH_PROPERTY=-Dwebdriver.edge.driver=/usr/bin/msedgedriver
162171
GECKO_DRIVER_PATH_PROPERTY=-Dwebdriver.gecko.driver=/usr/bin/geckodriver

‎StandaloneDocker/start-selenium-grid-docker.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,18 @@ echo "Selenium Grid Standalone Docker configuration: "
102102
cat "${CONFIG_FILE}"
103103

104104
EXTRA_LIBS=""
105+
if [ -n "${SE_EXTRA_LIBS}" ]; then
106+
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"
107+
fi
105108

106109
if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then
107110
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
108-
[ -n "$EXTRA_LIBS" ] && [ -n "${EXTERNAL_JARS}" ] && EXTRA_LIBS=${EXTRA_LIBS}:
109-
EXTRA_LIBS="--ext "${EXTRA_LIBS}${EXTERNAL_JARS}
111+
if [ -n "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
112+
EXTRA_LIBS="${EXTRA_LIBS}:${EXTERNAL_JARS}"
113+
elif [ -z "${EXTRA_LIBS}" ] && [ -n "${EXTERNAL_JARS}" ]; then
114+
EXTRA_LIBS="--ext ${EXTERNAL_JARS}"
115+
fi
110116
echo "Tracing is enabled"
111-
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
112117
if [ -n "$SE_OTEL_SERVICE_NAME" ]; then
113118
SE_OTEL_JVM_ARGS="$SE_OTEL_JVM_ARGS -Dotel.resource.attributes=service.name=${SE_OTEL_SERVICE_NAME}"
114119
fi
@@ -130,6 +135,10 @@ else
130135
echo "Tracing is disabled"
131136
fi
132137

138+
if [ -n "${EXTRA_LIBS}" ]; then
139+
echo "Classpath will be enriched with these external jars : ${EXTRA_LIBS}"
140+
fi
141+
133142
if [ -n "${SE_JAVA_HTTPCLIENT_VERSION}" ]; then
134143
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.httpclient.version=${SE_JAVA_HTTPCLIENT_VERSION}"
135144
fi

0 commit comments

Comments
 (0)