-
Notifications
You must be signed in to change notification settings - Fork 40.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spring-boot:build-image hangs if finalName is specified in Spring Boot plugin configuration #25590
Comments
Configuration options for the As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Please post questions to Stack Overflow. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug. |
If |
I think it is a bug. Here is a repo that shows the issue https://github.com/haninaguib/spring-issue-25590 It is a vanilla start.spring.io (maven, jdk11, starter-web) and the second commit only specifies the finalName in pom.xml The issue is it complains about not being able to find demo.jar.original (since spring named it demo-0.0.1-SNAPSHOT.jar, ie there is now demo.jar and demo-0.0.1-SNAPSHOT.jar in the target directory and no demo.jar.original). This is not about the docker image name but the springboot project finalName |
Thanks very much for the sample. I'm able to reproduce this now, and the plugin is indeed not correctly identifying the jar file that should be used to build the image when |
@haninaguib I'm looking into the best way to fix this issue, but the way that The name of the generated artifact should be configured in the
instead of:
Is there a reason why you were attempting to set the Spring Boot plugin |
The project I was working on was setup that way, not sure why (original developers are long gone), and moving it to build level fixes the issue in the original project. As far as I am concerned it is a user error and not an issue with spring boot. Not sure why I did not notice this when I created the sample project, sorry to take up your time. |
The fact that Maven is allowing the |
Unfortunately, there's nothing we can do about that, I think. It is a Maven bug that's opened for quite a while. I've tried to fix it in #16202, but that introduced a regression so we changed that again in #16456. |
If specify a finalName in my pom.xml file and then try to run spring-boot:build-image it hangs.
I suspect I may need to configure the spring-boot:build-image task , but cannot find much documentation.
Springboot version: 2.4.3
The text was updated successfully, but these errors were encountered: