Closed alexandru closed 12 years ago
Btw, the listing above was from using Ruby 1.9.3. However the error is different under JRuby ...
17:10:01 INFO NaetherRepository - Installed org.jsoup:jsoup/maven-metadata.xml to /home/alex/Projects/geosmartly/./lib/org/jsoup/jsoup/maven-metadata-local.xml
Errno::EACCES: Permission denied - /tmp/d20120514-11199-1coeh7a/.
from org/jruby/RubyFile.java:443:in `initialize'
from org/jruby/RubyIO.java:1135:in `open'
from /home/alex/.rvm/rubies/jruby-1.6.7/lib/ruby/1.8/fileutils.rb:699:in `remove_entry_secure'
from /home/alex/.rvm/rubies/jruby-1.6.7/lib/ruby/1.8/tmpdir.rb:131:in `mktmpdir'
from /home/alex/.rvm/gems/jruby-1.6.7/gems/lock_jar-0.2.2/lib/lock_jar/resolver.rb:34:in `initialize'
from /home/alex/.rvm/gems/jruby-1.6.7/gems/lock_jar-0.2.2/lib/lock_jar/runtime.rb:32:in `resolver'
from /home/alex/.rvm/gems/jruby-1.6.7/gems/lock_jar-0.2.2/lib/lock_jar/runtime.rb:105:in `lock'
from org/jruby/RubyHash.java:1181:in `each'
from /home/alex/.rvm/gems/jruby-1.6.7/gems/lock_jar-0.2.2/lib/lock_jar/runtime.rb:93:in `lock'
from /home/alex/.rvm/gems/jruby-1.6.7/gems/lock_jar-0.2.2/lib/lock_jar.rb:32:in `lock'
from (irb):6:in `evaluate'
from org/jruby/RubyKernel.java:1083:in `eval'
from /home/alex/.rvm/rubies/jruby-1.6.7/lib/ruby/1.8/irb.rb:158:in `eval_input'
from /home/alex/.rvm/rubies/jruby-1.6.7/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /home/alex/.rvm/rubies/jruby-1.6.7/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1410:in `loop'
from org/jruby/RubyKernel.java:1183:in `catch'
from /home/alex/.rvm/rubies/jruby-1.6.7/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /home/alex/.rvm/rubies/jruby-1.6.7/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1183:in `catch'
from /home/alex/.rvm/rubies/jruby-1.6.7/lib/ruby/1.8/irb.rb:70:in `start'
from /home/alex/.rvm/rubies/jruby-1.6.7/bin/irb:17:in `(root)'
Again, to make this work, I have to restart IRB and try again. But if I exit IRB, delete my local repository and then retry the command in IRB, then it gives me the above error. So the same pattern I got with Ruby 1.9.3
Try adding:
repository 'http://repo1.maven.org/maven2'
To the top of the Jarfile. It looks like the default repo is not being applied correctly, hence the 'cannot find super pom'.
This is an issue with 1.9, in both 1.9.2 and 1.9.3. I cannot reproduce it with JRuby or 1.8.
The error Errno::EACCES: Permission denied looks like the JRuby bug for Dir.mktmpdir, which LockJar uses when downloading Jars to bootstrap. http://jira.codehaus.org/browse/JRUBY-5678. If you try the call a second time, it works.
So I guess JRuby fixed the issue in 1.7
I believe so, I have not tested with JRuby 1.7 yet, only with 1.6
I pushed a new version, 0.3.0, that will fix this issue.
The problem was due to the temporary directory created for downloading jjars used to boot strap LockJar. After boot strapping, the temp dir was removed. While the JVM was fine, it caused the problem with the dependency resolution when it needed to access files used deleted with the temp dir. The work around is to create a .lock_jar/naether dir in the local repo for the bootstrap jars. After boot strapping, the temp jars are removed.
I have the following Jarfile ...
From IRB here's what I get:
This keeps repeating itself if I run that command in the same session. I noticed that if I exit IRB and then I go back and retry, it works. But the issue is reproducible by deleting my local repo of downloaded libraries. As I see it, LockJar downloads Naether dependencies the first time I do a lock(), as Naether has a bootstrap process.
For the moment, I can't find a workaround. To make matters worse, I want to install "lock_file" straight from my build file, to not require users to install it manually and after that I want to lock(). This means I have something like this:
Thanks,