@@ -106,11 +106,18 @@ if [ ! -z "${CONFIG_FILE}" ]; then
106106fi 
107107
108108EXTRA_LIBS=" " 
109+ if  [ -n  " ${SE_EXTRA_LIBS} " ;  then 
110+   echo  " Adding external jars to classpath: ${SE_EXTRA_LIBS} " 
111+   EXTRA_LIBS=" --ext ${SE_EXTRA_LIBS} " 
112+ fi 
109113
110114if  [ " ${SE_ENABLE_TRACING} " =  " true" &&  [ -n  " ${SE_OTEL_EXPORTER_ENDPOINT} " ;  then 
111115  EXTERNAL_JARS=$( < /external_jars/.classpath.txt) 
112-   [ -n  " $EXTRA_LIBS " &&  [ -n  " ${EXTERNAL_JARS} " &&  EXTRA_LIBS=${EXTRA_LIBS} :
113-   EXTRA_LIBS=" ${EXTRA_LIBS}${EXTERNAL_JARS} " 
116+   if  [ -n  " ${EXTRA_LIBS} " &&  [ -n  " ${EXTERNAL_JARS} " ;  then 
117+     EXTRA_LIBS=" ${EXTRA_LIBS} :${EXTERNAL_JARS} " 
118+   elif  [ -z  " ${EXTRA_LIBS} " &&  [ -n  " ${EXTERNAL_JARS} " ;  then 
119+     EXTRA_LIBS=" --ext ${EXTERNAL_JARS} " 
120+   fi 
114121  echo  " Tracing is enabled" 
115122  echo  " Classpath will be enriched with these external jars : " ${EXTRA_LIBS} 
116123  if  [ -n  " $SE_OTEL_SERVICE_NAME " ;  then 
136143
137144if  [ " ${SE_SESSIONS_MAP_EXTERNAL_DATASTORE} " =  " true" ;  then 
138145  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} " 
141- fi 
142- 
143- if  [ -n  " ${EXTRA_LIBS} " ;  then 
144-   EXTRA_LIBS=" --ext ${EXTRA_LIBS} " 
146+   if  [ -n  " ${EXTRA_LIBS} " &&  [ -n  " ${EXTERNAL_JARS} " ;  then 
147+     EXTRA_LIBS=" ${EXTRA_LIBS} :${EXTERNAL_JARS} " 
148+   elif  [ -z  " ${EXTRA_LIBS} " &&  [ -n  " ${EXTERNAL_JARS} " ;  then 
149+     EXTRA_LIBS=" --ext ${EXTERNAL_JARS} " 
150+   fi 
145151fi 
146152
147153cat " $CONFIG_FILE " 
0 commit comments