The Spring Boot Gradle Plugin provides Spring Boot support in Gradle, allowing you to package executable jar or war archives, run Spring Boot applications and use the dependency management provided by spring-boot-dependencies.
Questions tagged [spring-boot-gradle-plugin]
206 questions
8
votes
2 answers
Spring boot gradle plugin forces Mockito version
I have roughly the following setup:
test-utils/build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.3.1.RELEASE'
}
}
apply plugin:…

Amir Abiri
- 8,847
- 11
- 41
- 57
6
votes
2 answers
Publish Docker images using Spring Boot Plugin without credentials
I've got a Gradle project with Spring Boot plugin and am trying to publish the image built by the plugin: gradle bootBuildImage --publishImage
The problem is to publish "either token or username/password must be provided" and we can't do that since…

Rad
- 4,292
- 8
- 33
- 71
6
votes
3 answers
Spring Boot 2 NoSuchMethodException: org.springframework.mobile.device.Device.()
Recently I tried to update my Spring Boot application version from 1.5.10.RELEASE to 2.0.0.RELEASE
Project Environment
JDK version 1.8
jcenter() repository in Gradle
IDE Spring tool Suite (STS) Version: 3.9.2
I have encountered two issues
I…

Unknown
- 863
- 2
- 14
- 29
5
votes
1 answer
Spring Boot in Docker build by buildpack cannot load Font
My Spring Boot application runs in Docker and is build by gradlew bootBuildImage.
When run in Docker container application cannot load fonts
Caused by: java.lang.NullPointerException
at java.desktop/sun.awt.FontConfiguration.getVersion(Unknown…

Bartosz Bilicki
- 12,599
- 13
- 71
- 113
5
votes
1 answer
gradle 6.x kotlin spring-boot jar publish fails, workaround in gradle-kotlin-dsl needed
gradle 6.x release notes tells us that maven-publishing of boot-jars doesn't work because the default jar task is disabled by the spring-boot plugin.
A workaround is to tell Gradle what to upload. If you want to upload the bootJar, then you need to…

Dirk Hoffmann
- 1,444
- 17
- 35
5
votes
1 answer
Spring Boot web application running on Google App Engine - throws jetty exception
When I execute gradlew appengineRun, I consistently get:
Starting a Gradle Daemon (subsequent builds will be faster)
Mar 26, 2018 5:47:48 PM java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node…

Vinay
- 153
- 1
- 2
- 10
5
votes
3 answers
How to embed a javaagent in spring boot app using boot gradle plugin
I am using a javaagent for my spring boot app and currently I am running it via
java -javaagent:agent.jar -jar app.jar
My project is a gradle project and I want to embed the agent.jar inside the app.jar so that I can run it as
java…

Anindya Chatterjee
- 5,824
- 13
- 58
- 82
5
votes
1 answer
Multitenancy using Keycloak and SpringBoot
I am using spring boot adapter and keycloak spring boot adapter to perform multitenancy where i can access the page using an ip and domain name.
But when I run gradlew script it seems this bean is not detected no changes has happened. even after i…

James
- 211
- 3
- 4
- 12
5
votes
0 answers
Spring Boot Maven/Gradle plugin: bootRun task generates very long classpath?
Components
Spring Boot 1.4.3 (and have also tried with Spring Boot 1.5 RC1)
Java 1.8.0_112 on Mac OS Sierra
Gradle 3.3 / Maven 3.3.9
Simple Java web application configured with Spring Boot Gradle plugin (Same issue appears to be applicable to the…

Misagh Moayyed
- 4,154
- 2
- 15
- 25
4
votes
0 answers
spring boot native maven plugin can't use the paketobuildpacks/builder:tiny?
I was follow the sample try to run a hello world of spring boot native.
when I run the final command, mvn spring-boot:build-image,the error blew always occur
[INFO] > Running creator
[INFO] [creator] ===> DETECTING
[INFO] [creator] …

ChandlerSong
- 387
- 1
- 14
4
votes
2 answers
Can I pull the version for the Gradle org.springframework.boot plugin from my Gradle platform definition
I really like the Gradle java-platform feature. I've created my own platform that bundles spring-boot-dependencies along with other things. Now I have (shortened for clarity):
plugins {
id 'org.springframework.boot' version…

Dennis Doubleday
- 93
- 1
- 5
4
votes
1 answer
Run non main class of spring boot application through command line
I have spring boot application packaged as executable jar. Application has one utility class with main method which I want to invoke through command line but it seems that command is unable to find the class in classpath.
Command:
java -cp…

Shashi Shankar
- 859
- 2
- 8
- 25
4
votes
2 answers
How to execute Cucumber Spring Boot Packaged Jar from command line?
I am fairly new to cucumber-jvm world. Trying to package cucumber spring boot app as Jar. app runs fine from Eclipse. But when I package as executable jar it fails with Exception :
Exception in Main Thread, No backend Module found. Make sure that…

shah
- 77
- 1
- 5
4
votes
3 answers
access buildInfo in Spring Boot 2.0 with @Value
Previously in Spring Boot 1.x, I wrote a Gradle task to copy the jar's build version to the application's application.yml and replaced a given property by regex, e.g. info.build.version: 0.0.1
Migrating to Spring Boot 2.0, I realise there's the…

user3105453
- 1,881
- 5
- 32
- 55
4
votes
0 answers
Spring Boot Gradle plugin - live reload of resources with multi-module project
I am having problems getting live reload of static resources to work with a gradle multi-module project.
Here is my simplified project structure:
project
- application
- src/main/java/com/mypackage/MyApplication.java
- web
-…

dapperwaterbuffalo
- 2,672
- 5
- 35
- 48