mguymon / lock_jar

LockJar manages Java Jars for Ruby
http://mguymon.github.io/lock_jar/
Apache License 2.0
46 stars 9 forks source link

running lock_jar failing on travis #15

Closed phoet closed 10 years ago

phoet commented 10 years ago

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 :boom: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 :joy:

cheers

mguymon commented 10 years ago

Do you think it is related to this issue - http://stackoverflow.com/questions/11118070/buiding-hadoop-with-eclipse-maven-missing-artifact-jdk-toolsjdk-toolsjar1

phoet commented 10 years ago

@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

phoet commented 10 years ago

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]

mguymon commented 10 years ago

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.

mguymon commented 10 years ago

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.

phoet commented 10 years ago

@mguymon i tried both: https://github.com/tyro89/Viking/commit/678e4c72798d5307452b5305f11c07fbebedb23a

mguymon commented 10 years ago

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.

phoet commented 10 years ago

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

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

mguymon commented 10 years ago

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

phoet commented 10 years ago

:+1: thx for the help!