davsclaus opened a new pull request, #28741:
URL: https://github.com/apache/camel/pull/28741

   _Claude Code on behalf of davsclaus_
   
   Stage 2c of 
[CAMEL-24726](https://issues.apache.org/jira/browse/CAMEL-24726), after #28740 
(2b), which added `ProjectRunner` with the Camel Main run.
   
   `ProjectRunner` now runs every Maven runtime, as `camel run` does: Camel 
Main, Quarkus and Spring Boot, a new project (the files, exported to a Maven 
project of the run) and an existing one (a `pom.xml`). Only the jbang runtime, 
the run in the current JVM, is left for 2d.
   
   ## Changes
   
   - **The Quarkus and Spring Boot runs move out of `Run`**: `runQuarkus` and 
`runExistingQuarkusProject` are `QuarkusRunner`, `runSpringBoot` and 
`runExistingSpringBootProject` are `SpringBootRunner`, package-private classes 
of `org.apache.camel.dsl.jbang.export.run` next to `CamelMainRunner`. 
`ProjectRunner.start` runs the three runtimes; the jbang runtime is still an 
`IllegalArgumentException`.
   - **Stopping a run**: with Quarkus (`quarkus:dev`), Spring Boot 
(`spring-boot:run`) and an existing project, the process of the 
`RunningIntegration` is Maven. `stop()` stops it and the processes it started, 
as the cleanup does when the JVM exits, and the files of the run are removed 
once.
   - **What the runs share** is in `MavenRunSupport`, which is package-private 
again: the export request of a run, the `pom.xml` of an existing project with 
the dependencies of the run, the arguments of the JVM, the log of the run (the 
Quarkus log file, the Spring Boot logback configuration, whose template 
`spring-boot-logback.xml` moves to camel-jbang-export), and the cleanup. 
`CamelMainRunner` uses them as well.
   - **`Run`**: `runCamelMain`, `runQuarkus` and `runSpringBoot` keep their 
checks of the command line (the usage error of `--background`, and for Camel 
Main `--code` and the warning of `--data-dir`), and run with `ProjectRunner` in 
one place. `toRunRequest` maps `--camel-spring-boot-version` too. `Run` is 1848 
lines now, from 2903 before stage 2.
   - **The seam of the tests**: `Run.startProcess(ProcessBuilder)` is replaced 
by `Run.runContext()`, the `RunContext` of a run with Maven; a test sets the 
process starter on it (`super.runContext().withProcessStarter(...)`), so it 
runs neither Maven nor the application.
   - **API**: `ProjectRunner.RUN_PLATFORM_DIR` (the directory of the runs, 
which `camel debug` uses too), and `RunRequest.jfrEnabled()` and 
`jfrFileName()`.
   - **The export of a Quarkus or Spring Boot run copies the request**, as the 
Camel Main run does since 2b: it now also has the resource directories and the 
Maven settings of the run, which the old copy did not pass. Its printer is the 
one of `camel run` (as with Camel Main), which differs from the old one only 
with `--mcp-stdio`, where it is quiet.
   
   ## Tests
   
   - `RunExportGoldenTest`: no change to the expected files (45 tests), 
including the Maven-run cases of Quarkus and Spring Boot.
   - `RunExistingProjectTest`, `RunExportedProjectTest` and 
`RunMavenRuntimePreviousLogTest` move to camel-jbang-export and test 
`ProjectRunner` with a `RunRequest`; the tests of the JVM arguments of JFR and 
of `mergeJvmArgs` move from `RunTest` to `RunExportedProjectTest`. 
`RunTest.theOptionsOfARunWithMavenAreInTheRequest` (new) checks that `camel 
run` maps its options onto the request, such as the default `dev` profile.
   - `ProjectRunnerTest`: a new Spring Boot project, an existing Quarkus 
project in dev mode, an existing Spring Boot project with JFR, and the jbang 
runtime that is not run yet. A new Quarkus project needs Maven to resolve the 
Quarkus platform, so the golden cases `maven-quarkus` and `maven-quarkus-dev` 
cover it.
   - camel-jbang-export: 208 tests pass.
   - camel-jbang-core: 2434 tests in the default fork and 287 in the serial 
fork. The only failures, `EvalSimpleTest` (it runs the Camel installed with 
JBang) and 9 tests of the AI tools about the elvis operator of Simple, fail on 
`main` locally too.
   - The Kubernetes plugin compiles with its tests; the TUI plugin and the 
launcher compile.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_0128ThHB3iQdrvSRLVBGRrdP
   


-- 
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]

Reply via email to