Skip to content

Problem deploying a thin jar with included dependencies to Cloud Foundry #211

Open
@donnd-t

Description

@donnd-t

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions