Archimedes Trajano
Archimedes Trajano

Reputation: 41330

How to package spring-boot as multiple JARs with launcher?

I am trying to reduce my Docker layer sizes (not the overall image) by copying smaller chunks of data into the container. This will hopefully prevent the tls timeout which I cannot change on Azure DevOps.

However, spring-boot normally packages everything as a single uber JAR. I was wondering if it was possible to have spring-boot repackage it such that it is multiple JARs.

The other bonus of this is if I can COPY the spring-boot and dependency JAR files first they may be able to reuse the layer in another image.

Upvotes: 0

Views: 222

Answers (1)

Anton Straka
Anton Straka

Reputation: 139

I had a similar problem. I even had to split lib folder so I write own maven plugin. You can use it if you use maven for building and you want. sb-aplitter-plugin

Upvotes: 1

Related Questions