spring-boot-gradle-plugin

Unable to build image using gradle bootBuildImage in offline environment

纵然是瞬间 提交于 2021-01-01 08:11:33
问题 I am trying to build image on offline environment using paketobuildpacks/builder:base and paketobuildpacks/run:base-cnb image. I am running a demo spring-boot project that I created via http://start.spring.io/ So this is the command I'm using to build the image gradle clean build bootBuildImage On my machine that has internet connection, everything works fine, and I'm able to build the image successfully. However, when I bring the same project over to my offline environment and tried to do

Unable to build image using gradle bootBuildImage in offline environment

天涯浪子 提交于 2021-01-01 08:11:17
问题 I am trying to build image on offline environment using paketobuildpacks/builder:base and paketobuildpacks/run:base-cnb image. I am running a demo spring-boot project that I created via http://start.spring.io/ So this is the command I'm using to build the image gradle clean build bootBuildImage On my machine that has internet connection, everything works fine, and I'm able to build the image successfully. However, when I bring the same project over to my offline environment and tried to do

BootJar + MavenJar. Artifact wasn't produced by this build

为君一笑 提交于 2020-08-24 10:37:22
问题 I have a sample project with the following hierearhy: Sample (root) -- model (simple jar) -- api (springboot jar) I want to publish both generated jars: plain jar & bootJar to my localRepository. gradlew clean build -xTest publishToMavenLocal However, the following error occures: * What went wrong: Execution failed for task ':api:publishMavenJavaPublicationToMavenLocal'. > Failed to publish publication 'mavenJava' to repository 'mavenLocal' > Artifact api.jar wasn't produced by this build.

Spring boot and Gradle multi-modules project, failed to load dependencies correctly

依然范特西╮ 提交于 2020-08-08 05:27:21
问题 Basically I have a spring boot project build with Gradle. The project has a root project that contains another 4 sub-modules. The root project settings.gradle looks like this: rootProject.name = 'proj' include 'proj-app' include 'proj-integration-tests' include 'proj-model' include 'proj-service' The app module contains the spring-boot-gradle-plugin and exposes some api's. What I wanted to do was to create proj-integration-tests sub-module that only contain the integration tests. The problem

I/O error on GET request

别来无恙 提交于 2020-06-28 03:25:12
问题 I am using gradle for api and got this error : Exception in thread "main" org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8080/SpringBootRestApi/api/user/":Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:580) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:530) at org.springframework

Run non main class of spring boot application through command line

橙三吉。 提交于 2020-06-12 05:21:58
问题 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 client-stp-grid-publisher-SNAPSHOT.jar com.client.stp.util.JMXClientUtils I tried to set jar classpath in MANIFEST.MF using gradle jar task but no help: jar { baseName = 'client-stp-grid-publisher' manifest { attributes( 'Class-Path': "BOOT-INF/classes/*" )

how to proguard with spring-boot gradle plugin

余生长醉 提交于 2020-01-22 20:10:13
问题 How to setup proguard obfuscation with spring boot 2 and gradle build? Hello. Trying to setup code obfuscation of Spring Boot app with its gradle plugin and Proguard gradle plugin. Google mostly gives some approaches for older spring-boot-gradle-plugin version (i.e. this closest one using non-existing bootRepackage task), or using maven plugin (having repackage goal). Idea is to obfuscate classes before jar packaging, as I understand, but I don't see any entry points in current gradle plugin

How to run external war file with embedded tomcat of spring boot with gradle?

为君一笑 提交于 2020-01-01 17:09:11
问题 I am trying to deploy external war file into embedded tomcat of spring boot.I added gradle dependencies in the format of .war file and i want run this war with by spring boot app , but not running please anyone can help me out. 回答1: Just try with this approach. add this code block in your spring boot application. your war file must be placed in a src/main/resources directory. @Bean public EmbeddedServletContainerFactory servletContainerFactory() { return new