spring-boot-thin-launcher icon indicating copy to clipboard operation
spring-boot-thin-launcher copied to clipboard

Problem deploying a thin jar with included dependencies to Cloud Foundry

Open donnd-t opened this issue 8 months ago • 0 comments

Hi,

I'm trying to deploy a very simple Spring Boot demo app with all dependencies included in the "thin root" to Cloud Foundry.

This is my process:

# build thin jar
mvn clean install

# get all dependencies
mkdir tmp
cd tmp
java -jar target/demo-0.0.1-SNAPSHOT.jar --thin.dryrun --thin.root=.m2

# unzip the thin jar
unzip ../target/demo-0.0.1-SNAPSHOT.jar

#  zip everything up for deployment
zip ../target/demo.jar  .

It runs fine locally with:

java -Dthin.root=.m2 -jar target/demo.jar

When deploying to Cloud Foundry it just hangs with no obvious Java exception.

Manifest:

applications:
  - name: demo-david
    instances: 1
    path: target/demo.jar
    routes:
      - route: demo-david.apps.np.sdppcf.com
    env:
      JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 17.+ }, memory_calculator: { stack_threads: 25 } }'
      SPRING_PROFILES_ACTIVE: dev
      JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{enabled: false}'
      JBP_LOG_LEVEL: DEBUG
      THIN_ROOT: .m2

Any assistance would be much appreciated!

Logs from Cloud Foundry are attached. It just hangs at this point and eventually the deployment times out.

cloud-foundry-deployment-log.txt

Cheers, David

donnd-t avatar Mar 14 '25 22:03 donnd-t