-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Note that spring-boot-docker-compose is excluded by default from packaged jars #40556
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
Comments
The |
Additionally, the docker compose support is excluded from the built JAR file, as documented here. |
Good point, @mhalbritter. Thanks. I think that part of it had slipped my mind. Let's add a note to the reference documentation similar to the one that we already have for Devtools. |
Sorry, I'm still not quite sure. If I want to start Java jar, what should I do |
If you want to include docker compose support in the Uber JAR, set <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludeDockerCompose>false</excludeDockerCompose>
</configuration>
</plugin>
</plugins>
</build> |
I have found it, thank you. Just setfalse. |
Because it's intended as a development time feature. When using the JAR, you're usually deploying it somewhere, and there you don't usually use docker compose to provide the databases, etc. |
Understood, thank you. But it should be explained in the document 😂 |
That's what we're using this issue for :) |
@mhalbritter Is this for maven? what should I do if its a gradle project. Can we have a similar configuration for gradle in |
@purbarunc please read the documentation update that was made to close this issue. It links to https://docs.spring.io/spring-boot/gradle-plugin/packaging.html#packaging-executable.configuring.including-development-only-dependencies. |
I have read this already, but I am not able to get what should be the equivalent configuration for |
It's described in the docs. First, you should have the dependency in the
Then you need to include this configuration in the classpath of the
If you have any further questions, please follow up on Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. |
Starting normally in idea, but failing to run Java jar after packaging
The text was updated successfully, but these errors were encountered: