davsclaus commented on code in PR #27826:
URL: https://github.com/apache/camel/pull/27826#discussion_r4270133787
##########
dsl/camel-jbang/camel-launcher/src/main/resources/bin/camel.sh:
##########
@@ -100,9 +100,10 @@ then
REPO="$BASEDIR"
fi
-# Find the launcher JAR
+# Find the launcher JAR, excluding sources
LAUNCHER_JAR=
for f in "$BASEDIR"/camel-launcher-*.jar; do
+ case "$f" in *-sources.jar) continue ;; esac
Review Comment:
Maybe skip javadoc jars as well. They sort before the main jar in the same
way:
```suggestion
case "$f" in *-sources.jar|*-javadoc.jar) continue ;; esac
```
##########
dsl/camel-jbang/camel-launcher/src/main/resources/bin/camel.bat:
##########
@@ -49,9 +49,12 @@ set "JAVACMD=%CAMEL_JAVACMD%"
@REM Set JVM options if specified
if "%JAVA_OPTS%" == "" set JAVA_OPTS=-Xmx512m
-@REM Find the launcher JAR
+@REM Find the launcher JAR, excluding sources
set "LAUNCHER_JAR="
-for %%i in ("%BASEDIR%\camel-launcher-*.jar") do set "LAUNCHER_JAR=%%i"
+for %%i in ("%BASEDIR%\camel-launcher-*.jar") do (
+ echo %%~nxi| findstr /i /e /l /c:"-sources.jar" > nul
Review Comment:
Same here, if you agree on javadoc jars. `findstr` takes several `/c:`
strings:
```suggestion
echo %%~nxi| findstr /i /e /l /c:"-sources.jar" /c:"-javadoc.jar" > nul
```
This line is not run by any CI job (see the review body), so please check it
on Windows.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]