Reputation: 147
I use according to Spring documentation this Maven plugin:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.5.RELEASE</version>
<dependencies>
<dependency>
<groupId>org.springframework.boot.experimental</groupId>
<artifactId>spring-boot-thin-layout</artifactId>
<version>1.0.24.RELEASE</version>
</dependency>
</dependencies>
</plugin>
And it generates a very thin jar with ONLY my classes and nothing else. No Manifest.mf file at all (so it's not runnable) and no ThinJarWrapper class as expected either. Does it actually need MORE settings?
Upvotes: 0
Views: 807
Reputation: 36
You need to run thinPom or thinProperties task, then thinResolve task. After that in target/thin directory you can see root (include your_jar.jar and repository) and spring_wrapper.jar. You should start spring_wrapper.jar. Possible necessary command line arguments is --thin.root=target/root (your generated dependencies) --thin.archive=target/root/your_jar.jar (your thin jar) --thin.trace=true (enables tracing).
Other information can be found in github repos
Upvotes: 1