-
Notifications
You must be signed in to change notification settings - Fork 40
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
use jars from vendor/jars? #73
Comments
So far what I've been doing is adding this line to the |
I also have been seeing an error in the Docker environment when I run
|
quick question before I look into this: do you need to use jbundler or would |
@mkristian i'm actually not sure, to be honest. i've found it tough to sort out what my best option is. briefly, i have a gem that depends on a jar. (that much seems to be working fine) then i have an app that requires that gem, but in addition depends on another jar. the app itself i want to package as a jar ultimately. i'm happy to take your guidance on what the right practice is for my case. |
Perhaps you can help me better understand how the process works? Edited: I misunderstood my error messages before, the error is happening at the |
@mooreniemi when installing a gem whether bundler or this problem is with a docker container ? is it possible for you to share the Dockerfile which fails ? packing the app as a jar - with warbler or manually ? there are many ways to pack a ruby app as a jar ;) |
the post-install hook of an independent gem triggering a dependence on my project's jars seems wrong though, no? i can see it trying to trigger jars it or its transitive dependencies depend on, but that's not the case here. this is the entirety of the script that is still failing, even with the exported env var you suggested: #!/bin/bash
set -x
set -e
echo "STARTING STATIC ANALYSIS"
cd app_directory
export JARS_SKIP=true
jruby --version
jgem install rubocop
rubocop i will dig up the Dockerfile for the container my app is using as for packing up into a jar, i've been using |
@mooreniemi if you use warbler you need to stick to jbundler the post-install hook only does something on a gem with its jar dependencies. any thing else is bug. I would appreciate if can provide a reproducable case for me. or setting |
ill paste up the debug output soon, but fwiw i grabbed the Dockerfile
|
and the
|
thanx, will work through them tomorrow |
thanks @mkristian -- i'm not seeing any additional output using the env var you suggested. i will see what i can dig up from my end. |
oh this is alpine_base Dockerfile too
|
fyi: i added a def require_jar( *args )
return nil unless Jars.require?
puts "#{args}" and ran
|
as further confirmation something is amiss, i changed the script being executed on my dockerized CI pipeline: #!/bin/bash
set -x
set -e
echo "STARTING STATIC ANALYSIS"
jruby --version
export JARS_DEBUG=true
export JARS_SKIP=true
jgem install rubocop
cd app_directory
rubocop and get the following error (the gem installs fine outside the app directory) but:
|
@mooreniemi this looks ok for me. installing gems need yaml and yaml needs psych and psych needs a jar and then all jars gets installed when there is Jars.lock file. is there such file inside the vendor/jars directory ? one thing I was thinking about: the error with I thought you have the jars vendored ? |
@mkristian i'm really confused. if i am installing i do have the jars vendored, but that was my original question: it never seems to pick that up, and always tries to go for |
since I do not fully understand why you see all those jars loaded, I can not say it is intended or not. is there a |
|
looking into those vendor dirs is too much, you convinced me. ignoring the |
exporting of the env var resolved my issue for the moment. maybe i could PR some wiki/readme changes to help the next peeps along? i do think i would rather the application call thanks for all your responses by the way, really appreciate the work you do on this. |
I'm deploying an app in Docker. I won't have maven or the
.m2
repo in that environment. I usedjbundle install --vendor
to put the jars in avendor/jars
directory. How do I getJBUNDLER_LOCAL_REPO
to point tovendor/jars
or otherwise just not point to.m2
dir?The text was updated successfully, but these errors were encountered: