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

   _Claude Code on behalf of davsclaus_
   
   Replaces #28873. Thanks @apupier for finding the deploy failure and for the 
log.
   
   ### Why the snapshot deploy fails
   
   The Jenkins deploy job runs `-Dcamel.exe.build=true ... -Dquickly clean 
deploy`. `LauncherArchiveLayoutIT` (added in #28776) then fails with 
`NoClassDefFoundError: org/apache/camel/dsl/jbang/launcher/CamelLauncher`:
   
   - The `require-native-exe` profile bound failsafe however `-Dquickly` was 
set. `-Dquickly` only unbinds surefire's `default-test` in the root POM.
   - When `classesDirectory` is not set, failsafe 3.5.6 tests against the 
project's JAR. `camel-repackager-maven-plugin` rewrites that JAR in place with 
the Spring Boot layout, so the classes are under `BOOT-INF/classes/`. 
`CamelLauncherNativeExeIT` only checks files in `target/`, which is why it 
never failed. `LauncherArchiveLayoutIT` is the first IT that loads a main class.
   
   ### Changes
   
   - **camel-launcher `pom.xml`:** the failsafe execution moves out of 
`require-native-exe` into a profile of its own, `launcher-its`. That profile is 
active when `-Dquickly` is not set, the same switch the root POM uses for 
surefire. The ITs still run only with `-Dcamel.exe.build=true`, through their 
`@EnabledIfSystemProperty`. The execution sets `classesDirectory` to 
`${project.build.outputDirectory}`.
   - **`camel-launcher-native-exe.yml`:** the "Build launcher with native 
camel.exe" step drops `-DskipTests`. It is the only build that has the native 
exe files, so before this the two ITs and `PackagePlanTest` (also gated on 
`camel.exe.build`) ran in no CI build. The reproducibility rebuild and the 
deploy check keep `-DskipTests`.
   
   | Build | ITs |
   |---|---|
   | snapshot deploy (`-Dquickly`) | not bound |
   | release (`skipITs=true`) | skipped |
   | `mvn verify` | bound, skipped by their annotation |
   | `mvn verify -Dcamel.exe.build=true`, native exe workflow | run |
   
   ### Tested locally
   
   Run on macOS, without llvm-mingw. Fake non-empty `camel-exe` x64/arm64 
artifacts were installed into a scratch Maven repo.
   
   - `verify -Dcamel.exe.build=true`: both ITs pass (5 tests).
   - The same build without `classesDirectory`: the `NoClassDefFoundError` of 
the deploy.
   - `clean verify -Dquickly -Dcamel.exe.build=true`: no failsafe; the exe 
enforcer and the WinGet ZIP still work.
   - Plain `clean verify`: failsafe runs and the 5 ITs are skipped.
   - `clean verify -Dcamel.exe.build=true` with the unit tests: 314 run (42 
skipped), plus the 5 ITs; `PackagePlanTest` passes 31/31.
   
   The workflow change gets its first real run, with cross-compiled exes, on 
this PR.
   
   🤖 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