spring-petclinic-microservices
spring-petclinic-microservices copied to clipboard
Build Failure with Podman
Good morning
Many thanks to you for the work done on this project.
when I try to run the following command:
./mvnw clean install -PbuildDocker -Dcontainer.executable=podman
I get an error at the end telling me that the podman file is not in the docker directory
`./mvnw clean install -PbuildDocker -Dcontainer.executable=podman
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] spring-petclinic-microservices [pom]
[INFO] spring-petclinic-admin-server [jar]
[INFO] spring-petclinic-customers-service [jar]
[INFO] spring-petclinic-vets-service [jar]
[INFO] spring-petclinic-visits-service [jar]
[INFO] spring-petclinic-config-server [jar]
[INFO] spring-petclinic-discovery-server [jar]
[INFO] spring-petclinic-api-gateway [jar]
[INFO]
[INFO] -----< org.springframework.samples:spring-petclinic-microservices >-----
[INFO] Building spring-petclinic-microservices 3.2.0 [1/8]
[INFO] from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- clean:3.3.2:clean (default-clean) @ spring-petclinic-microservices ---
[INFO]
[INFO] --- install:3.1.1:install (default-install) @ spring-petclinic-microservices ---
[INFO] Installing /home/calebe/memoire/spring-petclinic-microservices/pom.xml to /home/calebe/.m2/repository/org/springframework/samples/spring-petclinic-microservices/3.2.0/spring-petclinic-microservices-3.2.0.pom
[INFO]
[INFO] --< org.springframework.samples.petclinic.admin:spring-petclinic-admin-server >--
[INFO] Building spring-petclinic-admin-server 3.2.0 [2/8]
[INFO] from spring-petclinic-admin-server/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.3.2:clean (default-clean) @ spring-petclinic-admin-server ---
[INFO] Deleting /home/calebe/memoire/spring-petclinic-microservices/spring-petclinic-admin-server/target
[INFO]
[INFO] --- git-commit-id:6.0.0:revision (default) @ spring-petclinic-admin-server ---
[INFO] dotGitDirectory '/home/calebe/memoire/spring-petclinic-microservices/.git'
[INFO] Collected git.build.user.name with value
[INFO] Collected git.build.user.email with value
[INFO] Collected git.branch with value main
[INFO] --always = true
[INFO] --dirty = -dirty
[INFO] --abbrev = 7
[INFO] Tag refs [[Ref[refs/tags/v1.5.9=387f824fd9f4ce6e1693b43eec9fc35867fc9f3e(-1)], Ref[refs/tags/v2.0.3=8fa041c08ec96e3079c0df4006b537f8c0b3ad85(-1)], Ref[refs/tags/v2.0.6=cd86db374402c7a86c1bcaded32ab26b3787d598(-1)], Ref[refs/tags/v2.1.4=636d71fb6b6e2a55db03f32d7364be784ebc4295(-1)], Ref[refs/tags/v2.2.8=b7faec307a6a198119776c69f8a910498b2c44f2(-1)], Ref[refs/tags/v2.3.6=61f4dcf2fdf9598a8af308e950ac606f3c0bec70(-1)], Ref[refs/tags/v2.6.7=a05f4fba7ce2877ee277b4b710d0f1ff5f1fb2ca(-1)], Ref[refs/tags/v3.0.9=ec50c28d6571fa5779b9117da8b9092443ef1297(-1)], Ref[refs/tags/v3.2.0=161c6bb15ca4e41efa85ca3148280b2dd8b9e629(-1)]]]
[INFO] Created map: [{}]
[INFO] evalCommit is [935bd5120ff56dbf34fd1681d6c4eb91f80afe7d]
[INFO] Collected git.commit.id.describe with value 935bd51-dirty
[INFO] Collected git.commit.id.describe-short with value 935bd51-dirty
[INFO] Collected git.commit.id with value 935bd5120ff56dbf34fd1681d6c4eb91f80afe7d
[INFO] Collected git.commit.id.abbrev with value 935bd51
[INFO] Collected git.dirty with value true
[INFO] Collected git.commit.user.name with value 9SMTM6
[INFO] Collected git.commit.user.email with value [email protected]
[INFO] Collected git.commit.message.full with value fix docker build on btrfs (#255)
[INFO] Collected git.commit.message.short with value fix docker build on btrfs (#255)
[INFO] Collected git.commit.time with value 2024-03-04T15:22:54+0100
[INFO] Collected git.commit.author.time with value 2024-03-04T15:22:54+0100
[INFO] Collected git.commit.committer.time with value 2024-03-04T15:22:54+0100
[INFO] Collected git.remote.origin.url with value https://github.com/spring-petclinic/spring-petclinic-microservices.git
[INFO] Collected git.tags with value
[INFO] evalCommit is [935bd5120ff56dbf34fd1681d6c4eb91f80afe7d]
[INFO] Tag refs [[Ref[refs/tags/v1.5.9=387f824fd9f4ce6e1693b43eec9fc35867fc9f3e(-1)], Ref[refs/tags/v2.0.3=8fa041c08ec96e3079c0df4006b537f8c0b3ad85(-1)], Ref[refs/tags/v2.0.6=cd86db374402c7a86c1bcaded32ab26b3787d598(-1)], Ref[refs/tags/v2.1.4=636d71fb6b6e2a55db03f32d7364be784ebc4295(-1)], Ref[refs/tags/v2.2.8=b7faec307a6a198119776c69f8a910498b2c44f2(-1)], Ref[refs/tags/v2.3.6=61f4dcf2fdf9598a8af308e950ac606f3c0bec70(-1)], Ref[refs/tags/v2.6.7=a05f4fba7ce2877ee277b4b710d0f1ff5f1fb2ca(-1)], Ref[refs/tags/v3.0.9=ec50c28d6571fa5779b9117da8b9092443ef1297(-1)], Ref[refs/tags/v3.2.0=161c6bb15ca4e41efa85ca3148280b2dd8b9e629(-1)]]]
[INFO] Created map: [{}]
[INFO] Collected git.closest.tag.name with value
[INFO] evalCommit is [935bd5120ff56dbf34fd1681d6c4eb91f80afe7d]
[INFO] Tag refs [[Ref[refs/tags/v1.5.9=387f824fd9f4ce6e1693b43eec9fc35867fc9f3e(-1)], Ref[refs/tags/v2.0.3=8fa041c08ec96e3079c0df4006b537f8c0b3ad85(-1)], Ref[refs/tags/v2.0.6=cd86db374402c7a86c1bcaded32ab26b3787d598(-1)], Ref[refs/tags/v2.1.4=636d71fb6b6e2a55db03f32d7364be784ebc4295(-1)], Ref[refs/tags/v2.2.8=b7faec307a6a198119776c69f8a910498b2c44f2(-1)], Ref[refs/tags/v2.3.6=61f4dcf2fdf9598a8af308e950ac606f3c0bec70(-1)], Ref[refs/tags/v2.6.7=a05f4fba7ce2877ee277b4b710d0f1ff5f1fb2ca(-1)], Ref[refs/tags/v3.0.9=ec50c28d6571fa5779b9117da8b9092443ef1297(-1)], Ref[refs/tags/v3.2.0=161c6bb15ca4e41efa85ca3148280b2dd8b9e629(-1)]]]
[INFO] Created map: [{}]
[INFO] Collected git.closest.tag.commit.count with value
[INFO] Collected git.total.commit.count with value 728
[INFO] Collected git.local.branch.ahead with value 0
[INFO] Collected git.local.branch.behind with value 0
[INFO] Collected git.build.time with value 2024-03-27T07:09:54+0100
[INFO] Collected git.build.version with value 3.2.0
[INFO] Collected git.build.host with value ubuntu
[INFO] including property 'git.tags' in results
[INFO] including property 'git.build.version' in results
[INFO] including property 'git.branch' in results
[INFO] including property 'git.build.host' in results
[INFO] including property 'git.commit.id' in results
[INFO] including property 'git.commit.user.email' in results
[INFO] including property 'git.local.branch.behind' in results
[INFO] including property 'git.commit.author.time' in results
[INFO] including property 'git.build.user.name' in results
[INFO] including property 'git.dirty' in results
[INFO] including property 'git.closest.tag.commit.count' in results
[INFO] including property 'git.commit.user.name' in results
[INFO] including property 'git.commit.id.abbrev' in results
[INFO] including property 'git.commit.id.describe-short' in results
[INFO] including property 'git.total.commit.count' in results
[INFO] including property 'git.commit.id.describe' in results
[INFO] including property 'git.build.user.email' in results
[INFO] including property 'git.commit.message.short' in results
[INFO] including property 'git.commit.committer.time' in results
[INFO] including property 'git.closest.tag.name' in results
[INFO] including property 'git.local.branch.ahead' in results
[INFO] including property 'git.commit.time' in results
[INFO] including property 'git.build.time' in results
[INFO] including property 'git.commit.message.full' in results
[INFO] including property 'git.remote.origin.url' in results
[INFO] Writing properties file [/home/calebe/memoire/spring-petclinic-microservices/spring-petclinic-admin-server/target/classes/git.properties] (for project spring-petclinic-admin-server)...
[INFO]
[INFO] --- spring-boot:3.2.0:build-info (default) @ spring-petclinic-admin-server ---
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ spring-petclinic-admin-server ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ spring-petclinic-admin-server ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 1 source file with javac [debug release 17] to target/classes
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ spring-petclinic-admin-server ---
[INFO] skip non existing resourceDirectory /home/calebe/memoire/spring-petclinic-microservices/spring-petclinic-admin-server/src/test/resources
[INFO]
[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ spring-petclinic-admin-server ---
[INFO] No sources to compile
[INFO]
[INFO] --- surefire:3.1.2:test (default-test) @ spring-petclinic-admin-server ---
[INFO] No tests to run.
[INFO]
[INFO] --- jar:3.3.0:jar (default-jar) @ spring-petclinic-admin-server ---
[INFO] Building jar: /home/calebe/memoire/spring-petclinic-microservices/spring-petclinic-admin-server/target/spring-petclinic-admin-server-3.2.0.jar
[INFO]
[INFO] --- spring-boot:3.2.0:repackage (repackage) @ spring-petclinic-admin-server ---
[INFO] Replacing main artifact /home/calebe/memoire/spring-petclinic-microservices/spring-petclinic-admin-server/target/spring-petclinic-admin-server-3.2.0.jar with repackaged archive, adding nested dependencies in BOOT-INF/.
[INFO] The original artifact has been renamed to /home/calebe/memoire/spring-petclinic-microservices/spring-petclinic-admin-server/target/spring-petclinic-admin-server-3.2.0.jar.original
[INFO]
[INFO] --- install:3.1.1:install (default-install) @ spring-petclinic-admin-server ---
[INFO] Installing /home/calebe/memoire/spring-petclinic-microservices/spring-petclinic-admin-server/pom.xml to /home/calebe/.m2/repository/org/springframework/samples/petclinic/admin/spring-petclinic-admin-server/3.2.0/spring-petclinic-admin-server-3.2.0.pom
[INFO] Installing /home/calebe/memoire/spring-petclinic-microservices/spring-petclinic-admin-server/target/spring-petclinic-admin-server-3.2.0.jar to /home/calebe/.m2/repository/org/springframework/samples/petclinic/admin/spring-petclinic-admin-server/3.2.0/spring-petclinic-admin-server-3.2.0.jar
[INFO]
[INFO] --- exec:3.1.1:exec (docker-build) @ spring-petclinic-admin-server ---
[ERROR] Command execution failed.
java.io.IOException: Cannot run program "podman" (in directory "/home/calebe/memoire/spring-petclinic-microservices/spring-petclinic-admin-server/../docker"): error=2, No such file or directory
at java.lang.ProcessBuilder.start (ProcessBuilder.java:1143)
at java.lang.ProcessBuilder.start (ProcessBuilder.java:1073)
at org.codehaus.mojo.exec.ExtendedExecutor.launch (ExtendedExecutor.java:62)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:336)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:881)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:841)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:447)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:578)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:578)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.ProcessImpl.forkAndExec (Native Method)
at java.lang.ProcessImpl.
`
Hi @hcalebe did you install podman? And does it is in your path? Maybe @zubcevic could have an idea?
It looks like you have not installed Podman itself on your machine or placed in the PATH. What platform are you using and does podman --version work for the user that is doing the mvn install.
It should work on MacOS with Podman Desktop, Windows Podman Desktop, WSL with an Ubuntu image with podman, Linux with podman etc.
Thanks @zubcevic for your answer. @hcalebe without any feedback from you, I'll close this issue. Please reopen if needed.