When I build a spring-boot application (to a standalone jar) using gradle build
, the proper artifacts are generated. The resulting jar contains all dependent jars and is executable.
I have also configured the maven-publish plugin as follows:
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
Now when I execute gradle publish
, a much smaller jar without dependencies gets build and published.
Following steps are not executed in the latter case.
:myProject:bootRepackage
:myProject:assemble
How can I make sure the correct build steps are executed when publishing?