Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use an uberjar created via a tools.build build program #18

Open
hanted26 opened this issue Jan 6, 2023 · 1 comment
Open

How to use an uberjar created via a tools.build build program #18

hanted26 opened this issue Jan 6, 2023 · 1 comment

Comments

@hanted26
Copy link

hanted26 commented Jan 6, 2023

Hello,
First of all, thank you for the great work you are doing with jibbit! Very much appreciated!

Is there any way I can use an uberjar created by my tools.build program to create the container image? I am currently generating some custom files before building the uberjar and I would like to have those files in the JAR used to create the image.

Thank you!

@slimslenderslacks
Copy link
Member

Hey @hanted26 - so sorry for taking so long to respond!

The dependent jars, gitlibs, and :local/roots from the your deps.edn basis are all copied on to a separate layer of the docker image so we don't really build a jar unless you've configured an :aot build. However, it should be possible to let you call your own tools.build to do that step.

I'm also wondering whether you could use a separate step before calling jibbit where you generate these custom files and write them to a :local/root that you reference in the dependencies of your deps.edn. That would end up copying them into a layer of your docker image and they'd be on the classpath of your program. Do you just load these generated files from the classpath (as io/resources maybe?). That might just work. Let me know.

If not, I could definitely add an option to copy these generated files into another image layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants