jvrubel commented on PR #26039:
URL: https://github.com/apache/camel/pull/26039#issuecomment-5513679575
Addressed the points in the following way:
1. `CamelLauncher.detectJarPath()` dropped — `CamelLauncher.java` now
calls `LauncherHelper.getLauncherJarPath()` directly and uses the shared
property constants, eliminating the
duplicated parsing logic that was missing jar:nested: support.
2. Windows path regression fixed — All three URL branches in
`LauncherHelper.parseJarPath()` now use `Paths.get(URI.create(...))` instead of
`URLDecoder.decode`. This correctly
converts `/C:/Users/..`. to `C:\Users\...` on Windows, and also avoids the
+→space bug from URLDecoder.
3. `isRunningFromLauncher()` false positive fixed — Now checks
`Path.of(jarPath).getFileName().toString().startsWith("camel-launcher")`
instead of
`jarPath.contains("camel-launcher")`.
4. Unit tests added — LauncherHelperTest covers all three URL forms plus
edge cases (percent-encoded spaces, Windows drive letters, unknown schemes,
missing /! boundary).
5. JVM args forwarded on spawn — `getCamelCommand()` now inserts
`ManagementFactory.getRuntimeMXBean().getInputArguments()` between java and
-jar, so child processes inherit proxy
settings, truststores, etc.
6. Warning on null fallback — When the launcher is detected but the JAR
path can't be resolved, `getCamelCommand()` now logs a warning including the
raw code-source URL before
falling back to camel.
--
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]