I've been trying to set up a new Spring Boot Web application using the following command:
spring init --java-version=1.7 --build=gradle --packaging=war --groupId=me.psychopunch.lab.springboot --artifactId=sample --name=quickstart sample
However, when I trying running the generated code using: gradle bootRun
, I build does not complete, and does not throw error either. I only get:
...
2016-01-11 22:44:28.127 INFO 3579 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-01-11 22:44:28.260 INFO 3579 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-01-11 22:44:28.266 INFO 3579 --- [ main] com.example.QuickstartApplication : Started QuickstartApplication in 5.312 seconds (JVM running for 6.091)
> Building 80% > :bootRun
The build gets stuck at around 80%. Sometimes it's 83%, 85%, etc. but it won't complete up to 100%. What am I doing wrong here?
Introduction. The Spring Boot Gradle Plugin provides Spring Boot support in Gradle. It allows you to package executable jar or war archives, run Spring Boot applications, and use the dependency management provided by spring-boot-dependencies . Spring Boot's Gradle plugin requires Gradle 6.8, 6.9, or 7.
You are going to need to update gradle, as newer spring boot versions are incompatible with older versions of gradle. You can either download the new gradle manually or use gradle wrapper to set the version for your project.
The Spring Boot gradle plugin provides the bootRun task that allows a developer to start the application in a “developer mode” without first building a JAR file and then starting this JAR file. Thus, it's a quick way to test the latest changes you made to the codebase.
It's actually running that's what the Started QuickstartApplication in 5.312 seconds (JVM running for 6.091) indicate.
Ignore the > Building 80% > :bootRun. When you terminate the spring process some more cleanup things will run in gradle.
I have a pretty big build process, mine prints Started... at 96%. :)
It's perfectly normal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With