Croway opened a new pull request, #2024: URL: https://github.com/apache/camel-spring-boot/pull/2024
Fixes [CAMEL-25465](https://issues.apache.org/jira/browse/CAMEL-25465). The two nested Maven JVMs run per starter IT (`archetype:generate`, then `compile dependency:build-classpath`) were about three quarters of a test's time, and the harness had a few gaps found while reviewing `tests/*`. ### Performance - **Archetype generated once per build**: the project is generated into `target/archetype-templates/<key>` (key covers the archetype jar and the versions passed to it), serialised across failsafe forks with a file lock, and copied per test. The archetype keeps its own `archetype:integration-test` coverage. - **One nested Maven runner** for both invocations: `-nsu` (the reactor just installed every snapshot), `-Xmx1g` in `MAVEN_OPTS` instead of the 3.5 GB inherited from `.mvn/jvm.config`, output captured and included in the failure message (archetype generation used to discard it). | | before | after | |---|---|---| | single IT, failsafe suite time | 6.1s | 2.8s | | single IT, `mvn verify` wall time | 9.5s | 4.8s | ### Correctness - **`dependencyVersionMismatchTest` could never fail**: the hard-failure branch required one `groupId:artifactId` with two versions, which Maven mediation rules out, so everything was warning-only. The local repository is now located from the `camel-spring-boot-starter` jar on the classpath (no more `repository/` substring matching, which passed vacuously for other repo names). Any version disagreement among `org.apache.camel` / `org.apache.camel.springboot` artifacts fails; other groups warn when major.minor differ. `netty-tcnative` is ignored as it is versioned independently. - **`maven-core` replaced by `maven-model`**: `maven-core` resolved as `provided` and put Guava, Guice, asm, plexus and friends on the parent classloader of the application under test, shadowing the starter's own versions through parent-first delegation. - `ArchetypeGenerationExtension` takes a `Supplier<ArchetypeConfig>`, so a subclass overriding `getArchetypeConfig()` can use its own fields (the field initializer ran before them), and the config is built once instead of three times. `beforeEach` registers in the class-level store. - Fat-jar IT asserts all three routes across both resource directories, not just the first. - Cleanups: dead `src/main/resources/logback.xml` (shadowed by `logback-test.xml`), redundant `junit-jupiter-api`, unclosed `Files.walk`, context classloader captured before the child loader exists, javadoc example. README updated accordingly, including the existing `-Dmvn-command=mvnd` knob (measured at roughly half to two thirds off each nested invocation). ### Testing Ran `CamelTimerIT`, `CamelAws2S3IT`, `CamelJolokiaIT`, `CamelKafkaIT`, `CamelJacksonIT`, `CamelOpentelemetryMetricsIT`, `CamelPlatformHttpIT`, `CamelZookeeperClusterServiceIT`, `CamelCoreIT`, `CamelCatalogIT` in one failsafe run from a clean `target` (template generated once with five forks contending), plus `CamelXmlWildcardRoutesIT`. All green. The Camel-group hard failure is new, so the first full Jenkins run is worth watching. _Claude Code (Claude Fable 5.1) on behalf of Federico Mariani_ -- 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]
