You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project developed with spring boot 3.3.x and compiled natively using GraalVM CE 21.0.1+12.1.
When trying to build the container image using kubernetes-maven-plugin version 1.17.0, I get the error “More than one native executable file found in /path-to-my-project/target”.
We can see below the output:
mvn k8s:resource k8s:build -DskipTests
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] 1.0.0-SNAPSHOT [pom]
[INFO] 1.0.0-SNAPSHOT gitsyn [pom]
[INFO] Módulo de entrega 1.0.0-SNAPSHOT gitsyn [pom]
[INFO] gitsyn-ms [jar]
[INFO]
[INFO] -------------------< com.tests.gitsyn:gitsyn >--------------------
[INFO] Building 1.0.0-SNAPSHOT [1/4]
[INFO] from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:resource (default-cli) @ gitsyn ---
[INFO] k8s: `k8s:resource` goal is skipped.
[INFO]
[INFO] --- k8s:1.17.0:build (default-cli) @ gitsyn ---
[INFO] k8s: `k8s:build` goal is skipped.
[INFO]
[INFO] ----------------< com.tests.gitsyn:gitsyn-config >----------------
[INFO] Building 1.0.0-SNAPSHOT gitsyn 1.0.0-SNAPSHOT [2/4]
[INFO] from gitsyn-config/pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:resource (default-cli) @ gitsyn-config ---
[INFO] k8s: `k8s:resource` goal is skipped.
[INFO]
[INFO] --- k8s:1.17.0:build (default-cli) @ gitsyn-config ---
[INFO] k8s: `k8s:build` goal is skipped.
[INFO]
[INFO] ---------------< com.tests.gitsyn:gitsyn-entrega >----------------
[INFO] Building Módulo de entrega 1.0.0-SNAPSHOT gitsyn 1.0.0-SNAPSHOT [3/4]
[INFO] from gitsyn-entrega/pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:resource (default-cli) @ gitsyn-entrega ---
[INFO] k8s: `k8s:resource` goal is skipped.
[INFO]
[INFO] --- k8s:1.17.0:build (default-cli) @ gitsyn-entrega ---
[INFO] k8s: `k8s:build` goal is skipped.
[INFO]
[INFO] ------------------< com.tests.gitsyn:gitsyn-ms >------------------
[INFO] Building gitsyn-ms 1.0.0-SNAPSHOT [4/4]
[INFO] from gitsyn-ms/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:resource (default-cli) @ gitsyn-ms ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for 1.0.0-SNAPSHOT 1.0.0-SNAPSHOT:
[INFO]
[INFO] 1.0.0-SNAPSHOT {project.aritfactID} SUCCESS [ 1.638 s]
[INFO] 1.0.0-SNAPSHOT gitsyn .... SUCCESS [ 0.047 s]
[INFO] 1.0.0-SNAPSHOT gitsyn SUCCESS [ 0.043 s]
[INFO] gitsyn-ms .......................................... FAILURE [ 1.643 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.923 s
[INFO] Finished at: 2024-12-02T18:12:02+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jkube:kubernetes-maven-plugin:1.17.0:resource (default-cli) on project gitsyn-ms: Execution default-cli of goal org.eclipse.jkube:kubernetes-maven-plugin:1.17.0:resource failed: Cannot load service org.eclipse.jkube.springboot.generator.SpringBootGenerator defined in jar:file:/root/.m2/org/eclipse/jkube/jkube-kit-spring-boot/1.17.0/jkube-kit-spring-boot-1.17.0.jar!/META-INF/jkube/generator-default : java.lang.reflect.InvocationTargetException. Aborting: More than one native executable file found in /root/dev/gitsyn/gitsyn-ms/target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :gitsyn-ms
If we have a look at the contents of the target directory, we can see that there is only one executable file, gitsyn-ms-1.0.0-SNAPSHOT:
If we look at the target directory, we will see that there is an executable named gitsyn-ms-1.0.0-SNAPSHOT (-rwxr-xr-x), which is the correct one, but as the files libjava.so and libjvm.so are also created, which also have execution permissions (-rwxr-xr-xr-x), the error occurs.
If I change the permissions of libjava.so and libjvm.so to (-rw-r--r--r--.), the error disappears.
It should be possible to tell the plugin which is the name of the executable file and that it does not take into account the others that exist in the same folder.
Eclipse JKube version
1.17.0
Component
Kubernetes Maven Plugin
Apache Maven version
3.8.5
Gradle version
None
Steps to reproduce
mvn k8s:resource k8s:build -DskipTests
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] 1.0.0-SNAPSHOT [pom]
[INFO] 1.0.0-SNAPSHOT gitsyn [pom]
[INFO] Módulo de entrega 1.0.0-SNAPSHOT gitsyn [pom]
[INFO] gitsyn-ms [jar]
[INFO]
[INFO] -------------------< com.tests.gitsyn:gitsyn >--------------------
[INFO] Building 1.0.0-SNAPSHOT [1/4]
[INFO] from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:resource (default-cli) @ gitsyn ---
[INFO] k8s: `k8s:resource` goal is skipped.
[INFO]
[INFO] --- k8s:1.17.0:build (default-cli) @ gitsyn ---
[INFO] k8s: `k8s:build` goal is skipped.
[INFO]
[INFO] ----------------< com.tests.gitsyn:gitsyn-config >----------------
[INFO] Building 1.0.0-SNAPSHOT gitsyn 1.0.0-SNAPSHOT [2/4]
[INFO] from gitsyn-config/pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:resource (default-cli) @ gitsyn-config ---
[INFO] k8s: `k8s:resource` goal is skipped.
[INFO]
[INFO] --- k8s:1.17.0:build (default-cli) @ gitsyn-config ---
[INFO] k8s: `k8s:build` goal is skipped.
[INFO]
[INFO] ---------------< com.tests.gitsyn:gitsyn-entrega >----------------
[INFO] Building Módulo de entrega 1.0.0-SNAPSHOT gitsyn 1.0.0-SNAPSHOT [3/4]
[INFO] from gitsyn-entrega/pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:resource (default-cli) @ gitsyn-entrega ---
[INFO] k8s: `k8s:resource` goal is skipped.
[INFO]
[INFO] --- k8s:1.17.0:build (default-cli) @ gitsyn-entrega ---
[INFO] k8s: `k8s:build` goal is skipped.
[INFO]
[INFO] ------------------< com.tests.gitsyn:gitsyn-ms >------------------
[INFO] Building gitsyn-ms 1.0.0-SNAPSHOT [4/4]
[INFO] from gitsyn-ms/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:resource (default-cli) @ gitsyn-ms ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for 1.0.0-SNAPSHOT 1.0.0-SNAPSHOT:
[INFO]
[INFO] 1.0.0-SNAPSHOT {project.aritfactID} SUCCESS [ 1.638 s]
[INFO] 1.0.0-SNAPSHOT gitsyn .... SUCCESS [ 0.047 s]
[INFO] 1.0.0-SNAPSHOT gitsyn SUCCESS [ 0.043 s]
[INFO] gitsyn-ms .......................................... FAILURE [ 1.643 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.923 s
[INFO] Finished at: 2024-12-02T18:12:02+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jkube:kubernetes-maven-plugin:1.17.0:resource (default-cli) on project gitsyn-ms: Execution default-cli of goal org.eclipse.jkube:kubernetes-maven-plugin:1.17.0:resource failed: Cannot load service org.eclipse.jkube.springboot.generator.SpringBootGenerator defined in jar:file:/root/.m2/org/eclipse/jkube/jkube-kit-spring-boot/1.17.0/jkube-kit-spring-boot-1.17.0.jar!/META-INF/jkube/generator-default : java.lang.reflect.InvocationTargetException. Aborting: More than one native executable file found in /root/dev/gitsyn/gitsyn-ms/target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :gitsyn-ms
Expected behavior
[INFO] ------------------< com.tests.gitsyn:gitsyn-ms >------------------
[INFO] Building gitsyn-ms 1.0.0-SNAPSHOT [4/4]
[INFO] from gitsyn-ms/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- k8s:1.17.0:resource (default-cli) @ gitsyn-ms ---
[INFO] k8s: Generators:
[INFO] k8s: - dockerfile-simple
[INFO] k8s: - quarkus
[INFO] k8s: - spring-boot
[INFO] k8s: - thorntail-v2
[INFO] k8s: - wildfly-jar
[INFO] k8s: - openliberty
[INFO] k8s: - karaf
[INFO] k8s: - vertx
[INFO] k8s: - micronaut
[INFO] k8s: - helidon
[INFO] k8s: - java-exec
[INFO] k8s: - webapp
[INFO] k8s: Generating resources
[INFO] k8s: Enrichers:
[INFO] k8s: - jkube-metadata
[INFO] k8s: - jkube-controller
[INFO] k8s: - jkube-controller-from-configuration
[INFO] k8s: - jkube-service
[INFO] k8s: - jkube-namespace
[INFO] k8s: - jkube-image
[INFO] k8s: - jkube-portname
[INFO] k8s: - jkube-project-label
[INFO] k8s: - jkube-well-known-labels
[INFO] k8s: - jkube-dependency
[INFO] k8s: - jkube-pod-annotations
[INFO] k8s: - jkube-git
[INFO] k8s: - jkube-maven-scm
[INFO] k8s: - jkube-serviceaccount
[INFO] k8s: - jkube-maven-issue-mgmt
[INFO] k8s: - jkube-debug
[INFO] k8s: - jkube-persistentvolumeclaim-storageclass
[INFO] k8s: - jkube-configmap-file
[INFO] k8s: - jkube-secret-file
[INFO] k8s: - jkube-openshift-route
[INFO] k8s: - jkube-openshift-project
[INFO] k8s: - jkube-ingress
[INFO] k8s: - jkube-healthcheck-quarkus
[INFO] k8s: - jkube-healthcheck-spring-boot
[INFO] k8s: - jkube-healthcheck-thorntail-v2
[INFO] k8s: - jkube-healthcheck-wildfly-jar
[INFO] k8s: - jkube-healthcheck-karaf
[INFO] k8s: - jkube-healthcheck-vertx
[INFO] k8s: - jkube-healthcheck-docker
[INFO] k8s: - jkube-healthcheck-webapp
[INFO] k8s: - jkube-healthcheck-micronaut
[INFO] k8s: - jkube-healthcheck-openliberty
[INFO] k8s: - jkube-healthcheck-smallrye
[INFO] k8s: - jkube-healthcheck-helidon
[INFO] k8s: - jkube-prometheus
[INFO] k8s: - jkube-service-discovery
[INFO] k8s: - jkube-container-env-java-options
[INFO] k8s: - jkube-revision-history
[INFO] k8s: - jkube-docker-registry-secret
[INFO] k8s: - jkube-triggers-annotation
[INFO] k8s: - jkube-openshift-imageChangeTrigger
[INFO] k8s: - jkube-name
[INFO] k8s: - jkube-replicas
[INFO] k8s: - jkube-imagepullpolicy
[INFO] k8s: Using resource templates from /root/dev/gitsyn/gitsyn-ms/src/main/jkube
[INFO] k8s: jkube-service: Adding a default service 'gitsyn-ms-service-app' with ports [8080]
[INFO] k8s: jkube-portname: Adding default port name http for port 8080
[INFO] k8s: jkube-debug: Debugging not enabled. To enable try setting the jkube.debug.enabled maven or system property to 'true'
[INFO] k8s: jkube-healthcheck-spring-boot: Adding readiness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 10 seconds
[INFO] k8s: jkube-healthcheck-spring-boot: Adding liveness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 180 seconds
[INFO] k8s: jkube-service-discovery: Using first mentioned service port '8080'
[INFO] k8s: jkube-revision-history: Adding revision history limit to 2
[INFO] k8s: jkube-docker-registry-secret: Adding secrets resources from plugin configuration
[INFO] k8s: Validating resources
[INFO] k8s: validating /root/dev/gitsyn/gitsyn-despliegue/kubernetes/gitsyn-ms-service-app-service.yml resource
[WARNING] Unknown keyword serializer - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword or if it should generate annotations AnnotationKeyword
[WARNING] Unknown keyword deserializer - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword or if it should generate annotations AnnotationKeyword
[INFO] k8s: validating /root/dev/gitsyn/gitsyn-despliegue/kubernetes/gitsyn-ms-deployment.yml resource
[INFO] k8s: validating /root/dev/gitsyn/gitsyn-despliegue/kubernetes/gitsyn-route.yml resource
[INFO]
[INFO] --- k8s:1.17.0:build (default-cli) @ gitsyn-ms ---
[INFO] k8s: Generators:
[INFO] k8s: - dockerfile-simple
[INFO] k8s: - quarkus
[INFO] k8s: - spring-boot
[INFO] k8s: - thorntail-v2
[INFO] k8s: - wildfly-jar
[INFO] k8s: - openliberty
[INFO] k8s: - karaf
[INFO] k8s: - vertx
[INFO] k8s: - micronaut
[INFO] k8s: - helidon
[INFO] k8s: - java-exec
[INFO] k8s: - webapp
JIB> Base image 'harbor.test.local/library/ubi9' does not use a specific image digest - build may not be reproducible
JIB> Containerizing application with the following files:
JIB> Aplicacion:
JIB> /root/dev/gitsyn/gitsyn-config/main/resources/dev
JIB> /root/dev/gitsyn/gitsyn-config/main/resources/dev/gitsyn.properties
JIB> /root/dev/gitsyn/gitsyn-config/main/resources/dev/logback-spring.xml
JIB> /root/dev/gitsyn/gitsyn-ms/target/gitsyn-ms-1.0.0-SNAPSHOT
JIB> Jkube-generated-layer-final-artifact:
JIB> /root/dev/gitsyn/gitsyn-ms/target/gitsyn-ms-1.0.0-SNAPSHOT.jar
JIB> Getting manifest for base image harbor.test.local/library/ubi9...
JIB> Building aplicacion layer...
JIB> Building jkube-generated-layer-final-artifact layer...
JIB> The base image requires auth. Trying again for harbor.test.local/library/ubi9...
JIB> WWW-Authenticate for harbor.test.local/library/ubi9: Bearer realm="https://harbor.test.local/service/token",service="harbor-registry",scope="repository:library/ubi9:pull"
JIB> bearer auth succeeded for harbor.test.local/library/ubi9
JIB> Using base image with digest: sha256:3942c7ee20130b2f8c1ca153d0c380af185e145229d5e3a8d6bd34d4cde9ab43
JIB> Building jkube-generated-layer-final-artifact layer built sha256:013347b9d49dfc3942cf44fc3f925969ed36ca98908333985c4308b2da23cce0
JIB> Building aplicacion layer built sha256:135871585d9dcfa16a27733f27f0dbb772b3f07167e6d24b82638bb710495fb1
JIB>
JIB> Container entrypoint set to [/opt/apps/gitsyn-ms-1.0.0-SNAPSHOT, -Dapps_config_path=/opt/apps/apps-config, -Dapps_temp_path=/opt/apps/apps-temp, -Dapps_env=dev]
JIB> Building image to tar file...
JIB> [======================== ] 80,0% complete > writing to tar file
JIB> [==============================] 100,0% complete
[INFO] k8s: /root/dev/gitsyn/gitsyn-ms/target/docker/harbor.test.local/aac/gitsyn/1.0.0-SNAPSHOT/tmp/jib-image.linux-amd64.tar successfully built
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for 1.0.0-SNAPSHOT {project.aritfactID} 1.0.0-SNAPSHOT:
[INFO]
[INFO] 1.0.0-SNAPSHOT SUCCESS [ 1.357 s]
[INFO] 1.0.0-SNAPSHOT gitsyn .... SUCCESS [ 0.048 s]
[INFO] 1.0.0-SNAPSHOT gitsyn SUCCESS [ 0.043 s]
[INFO] gitsyn-ms .......................................... SUCCESS [ 19.890 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.884 s
[INFO] Finished at: 2024-12-02T18:38:19+01:00
[INFO] ------------------------------------------------------------------------
Runtime
OpenShift
Kubernetes API Server version
1.25.3
Environment
Linux
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
For the generator we'll need to find a reliable way to isolate the resulting binary from the copied lib files.
Your suggestion to be able to provide the name of the binary is a good fallback solution.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I have a project developed with spring boot 3.3.x and compiled natively using GraalVM CE 21.0.1+12.1.
When trying to build the container image using kubernetes-maven-plugin version 1.17.0, I get the error “More than one native executable file found in /path-to-my-project/target”.
We can see below the output:
If we have a look at the contents of the target directory, we can see that there is only one executable file, gitsyn-ms-1.0.0-SNAPSHOT:
If we look at the target directory, we will see that there is an executable named gitsyn-ms-1.0.0-SNAPSHOT (-rwxr-xr-x), which is the correct one, but as the files libjava.so and libjvm.so are also created, which also have execution permissions (-rwxr-xr-xr-x), the error occurs.
If I change the permissions of libjava.so and libjvm.so to (-rw-r--r--r--.), the error disappears.
It should be possible to tell the plugin which is the name of the executable file and that it does not take into account the others that exist in the same folder.
Eclipse JKube version
1.17.0
Component
Kubernetes Maven Plugin
Apache Maven version
3.8.5
Gradle version
None
Steps to reproduce
Expected behavior
Runtime
OpenShift
Kubernetes API Server version
1.25.3
Environment
Linux
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: