mguymon / lock_jar

LockJar manages Java Jars for Ruby

Home Page:http://mguymon.github.io/lock_jar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

running lock_jar failing on travis

phoet opened this issue · comments

hi,

it would be super nice if someone could have a look at the travis build here: https://travis-ci.org/tyro89/Viking/builds/20711247#L346-L349

it's 💥ing while resolving dependencies with lock_jar: Could not find artifact jdk.tools:jdk.tools:jar:1.6 in central (http://repo1.maven.org/maven2/)

afaik, tools.jar should be included within the jdk and not downloaded from anywhere...

if you have any direction to point me to, that would be pretty much appreciated 😂

cheers

@mguymon yes, this is probably a similar case. i just can't figure out how i would fix this in lock_jar land.

resolving dependencies locally works properly...

i just tried adding local "#{ENV['JAVA_HOME']}/lib/tools.jar" which also works locally but fails on travis: https://travis-ci.org/tyro89/Viking/builds/20729583

it also looks like jruby runs with the right java version: jruby 1.7.9 (1.9.3p392) 2014-02-10 87b108a on OpenJDK 64-Bit Server VM 1.6.0_27-b27 [linux-amd64]

Yeah, this might be a bug in lockjar. The jdk.tools:jdk.tools:jar:1.6 is not listed in the Jarfile.lock but is being pulled in when Naether resolves deps.

I see when the tests run, the Jarfile is locked. It makes more sense to save the Jarfile.lock in git and just do an install - https://github.com/tyro89/Viking/blob/master/ext/mkrf_conf.rb

That should stop the error with the missing jdk jar, since LockJar will only install jars from the Jarfile.lock. I am still looking into handling sys deps properly.

remove the LockJar.lock(jarfile) from mkrf_conf.rb that is running the dep resolution on install, which you probably do not want to happen.

@mguymon sweet! https://travis-ci.org/tyro89/Viking/builds/20784339

so the problem was in the lock step! 😅 obvious when you think about it

There is still the issue with properly handling system deps. I am going to dig into that a little more.

👍 thx for the help!