question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to read from ~/.m2 but save into the given thin.root for faster builds

See original GitHub issue

I need something that I would expect to be a very common use case: I want to output all the dependencies of my thin jar into a directory without downloading them all anew when they already are in my local maven repository. Currently this seems impossible (without running Nexus or something similar).

What I do on my build server is:

gradle build # fetches build and runtime dependencies, produces a thin jar
java -Dthin.root=./libs-root -jar myapp-thin.jar
package-into-docker ./libs-root myapp-thin.jar

Am I missing something? Thank you!!!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
dsyercommented, Sep 23, 2020

You definitely should try 1.0.25 at least. And snapshots if that doesn’t work.

0reactions
holyjakcommented, Oct 7, 2020

Hi! I am sorry, I discovered a much simpler solution to my problem, simply using a Gradle task to copy all libs into a dir, adding the spring-boot-loader.jar and the original app-only jar and using the standard org.springframework.boot.loader.JarLauncher. I need no fancy download-on-first-use functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven docker cache dependencies - Stack Overflow
m2 mounts cache to the specified place in maven image Dockerfile docs. For building you can run the following command: DOCKER_BUILDKIT=1 docker build...
Read more >
spring-boot-thin-launcher/README.md at main - GitHub
To run the build plugins resolve goals you can make the thin launcher jar a dependency of the plugin, to ensure it is...
Read more >
Fasten Docker build – DEVOPS DONE RIGHT - Blog
Context Recently I started working on a microservices project, ... I was able to reduce docker image build time from 4 minutes to...
Read more >
Faster Maven builds in Docker - A Java geek
Today, I'd like to widen the scope and do the same for Maven builds inside Docker. Between each run, we change the source...
Read more >
How to Speed up Your Maven Build - JRebel
In this article, we look at the popular Java build tool, Apache Maven, and give five tips on how to speed up Maven...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found