davsclaus opened a new pull request, #27204:
URL: https://github.com/apache/camel/pull/27204
_Claude Code on behalf of davsclaus_
Found while running camel-spring-boot-examples from the TUI (Open project,
F10 Run).
`camel run` of an existing Spring Boot project copied a logback
configuration into the project's `src/main/resources/logback-camel-jbang.xml`
and pointed `-Dlogging.config=classpath:logback-camel-jbang.xml` at it (so the
app logs to file, which the TUI reads). It had two problems:
- A project without `src/main/resources` failed to start, as
`rest-openapi-simple` has none:
```
java.nio.file.NoSuchFileException:
.../rest-openapi-simple/src/main/resources/logback-camel-jbang.xml
at
org.apache.camel.dsl.jbang.core.commands.Run.runExistingSpringBootProject(Run.java:2494)
```
As the exception came before the cleanup hook was registered, the
generated `camel-jbang-run-pom.xml` was also left behind in the project.
- The run wrote into the user's project sources.
The configuration is now a temp file, passed as `-Dlogging.config=file:...`
and deleted when the run ends. Nothing is written to `src/main/resources`.
### Tests
- `RunExistingProjectTest.springBootLogsToFileViaLogbackConfiguration`
checks that the argument is a `file:` URI of an existing logback configuration.
The other JVM arguments are unchanged.
- `RunExistingProjectTest` and `RunExportedProjectTest` pass.
- Checked live: `rest-openapi-simple` now starts from the TUI, and the
project stays unchanged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]