This is an automated email from the ASF dual-hosted git repository.

Croway pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.18.x by this push:
     new cfb9ef4ef70b CAMEL-23422: Remove DefaultLaunchScript from 
camel-repackager-maven-plugin
cfb9ef4ef70b is described below

commit cfb9ef4ef70b28085c5245dd8792e02d7eeb4e25
Author: Croway <[email protected]>
AuthorDate: Fri May 8 15:53:50 2026 +0200

    CAMEL-23422: Remove DefaultLaunchScript from camel-repackager-maven-plugin
    
    The launch script prepends a 9KB bash header (#!/bin/bash) to the
    repackaged JAR. This breaks JarInputStream/ZipInputStream which read
    sequentially from byte 0 and cannot find the PK signature, causing
    FatJarPackageScanResourceResolver to discover 0 entries (no routes,
    no classes, no beans). This effectively makes all camel-main fatjar
    exports non-functional.
    
    The fix was already applied on main via commit 5ab912dcd05e but was
    not backported to camel-4.18.x.
---
 .../src/main/java/org/apache/camel/maven/RepackageMojo.java         | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/tooling/maven/camel-repackager-maven-plugin/src/main/java/org/apache/camel/maven/RepackageMojo.java
 
b/tooling/maven/camel-repackager-maven-plugin/src/main/java/org/apache/camel/maven/RepackageMojo.java
index 4dad4468f106..3ffeec345ba4 100644
--- 
a/tooling/maven/camel-repackager-maven-plugin/src/main/java/org/apache/camel/maven/RepackageMojo.java
+++ 
b/tooling/maven/camel-repackager-maven-plugin/src/main/java/org/apache/camel/maven/RepackageMojo.java
@@ -29,8 +29,6 @@ import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.project.MavenProject;
-import org.springframework.boot.loader.tools.DefaultLaunchScript;
-import org.springframework.boot.loader.tools.LaunchScript;
 import org.springframework.boot.loader.tools.Library;
 import org.springframework.boot.loader.tools.LibraryCallback;
 import org.springframework.boot.loader.tools.LibraryScope;
@@ -95,10 +93,8 @@ public class RepackageMojo extends AbstractMojo {
             repackager.setBackupSource(backupSource);
             repackager.setMainClass(mainClass);
 
-            LaunchScript launchScript = new DefaultLaunchScript(null, null);
-
             File targetFile = getTargetFile();
-            repackager.repackage(targetFile, this::getLibraries, launchScript);
+            repackager.repackage(targetFile, this::getLibraries);
 
             getLog().info("Successfully created self-executing JAR: " + 
targetFile);
 

Reply via email to