buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: Error merging JAR
Date Tue, 26 Apr 2011 13:59:05 GMT
Hi Ryan,

Looks like a bug in RubyZip...  the following monkeypatch fixes it:

module Zip
  class ZipEntrySet
    def <<(entry)
      @entrySet[entry.to_s] = entry if entry != nil
    end
  end
end

(which you can save in fix_rubyzip.rb and require 'fix_rubyzip' at the top
of your buildfile)

I'll commit a fix in buildr trunk soon.

alex

On Tue, Apr 26, 2011 at 4:46 AM, Ryan Richt <ryan_richt@me.com> wrote:

> Thank you replying to my tweet!
>
> I get this error when trying to merge the apache httpclient jar into a
> package (from ibiblio or maven). Other jars merge fine, and it affects at
> least the last several versions of httpclient. It seems to have trouble
> unzipping.
>
> If i manually unzip and merge all my jars, my application works fine (and
> it was working this way for months)
>
> Has anyone seen this with other jars before?
>
> Thank you so much your help!
>
>
> ...
> Adding org/codehaus/jackson/schema/JsonSerializableSchema.class
> Adding org/codehaus/jackson/schema/SchemaAware.class
> Adding org/codehaus/jackson/schema/package-info.class
> ** Invoke
> /Users/ry/.m2/repository/org/apache/httpcomponents/httpclient/4.0.3/httpclient-4.0.3.jar
> (not_needed)
>
> Exception while invoking prerequisites of task
> <Buildr::Packaging::Java::JarTask
> /Users/ry/seqosystem/src/deps/target/dependencies.jar => [sos:deps:build]>
> Exception while invoking prerequisites of task <Rake::Task sos:deps:package
> => [sos:deps:build, /Users/ry/seqosystem/src/deps/target/dependencies.jar]>
> Buildr aborted!
> TypeError : can't dup NilClass
> org/jruby/RubyKernel.java:1873:in `dup'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/rubyzip-0.9.4/lib/zip/zip.rb:1163:in
> `dup'
> org/jruby/RubyArray.java:2306:in `collect'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/rubyzip-0.9.4/lib/zip/zip.rb:1163:in
> `dup'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/rubyzip-0.9.4/lib/zip/zip.rb:1399:in
> `initialize'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/rubyzip-0.9.4/lib/zip/zip.rb:1411:in
> `open'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/packaging/archive.rb:295:in
> `expand'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/packaging/archive.rb:118:in
> `merge'
> org/jruby/RubyProc.java:268:in `call'
> org/jruby/RubyProc.java:228:in `call'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/packaging/archive.rb:138:in
> `add_files'
> org/jruby/RubyArray.java:1572:in `each'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/packaging/archive.rb:138:in
> `add_files'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/packaging/archive.rb:475:in
> `invoke_prerequisites'
> org/jruby/RubyHash.java:1167:in `each'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/packaging/archive.rb:474:in
> `invoke_prerequisites'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:667:in
> `invoke_with_call_chain'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/1.8/monitor.rb:191:in
> `mon_synchronize'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/1.8/monitor.rb:190:in
> `mon_synchronize'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:660:in
> `invoke_with_call_chain'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
> `invoke_prerequisites'
> org/jruby/RubyArray.java:1572:in `each'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
> `invoke_prerequisites'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:667:in
> `invoke_with_call_chain'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/1.8/monitor.rb:191:in
> `mon_synchronize'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:660:in
> `invoke_with_call_chain'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:655:in
> `invoke'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
> `invoke_task'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:246:in
> `top_level'
> org/jruby/RubyArray.java:1572:in `each'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:246:in
> `top_level'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:535:in
> `standard_exception_handling'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:237:in
> `top_level'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:138:in
> `run'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:535:in
> `standard_exception_handling'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/lib/buildr/core/application.rb:135:in
> `run'
> /Users/ry/Cellar/jruby/1.6.0/jruby/lib/ruby/gems/1.8/gems/buildr-1.4.5-java/bin/buildr:19:in
> `(root)'
> org/jruby/RubyKernel.java:1062:in `load'
> /Users/ry/Cellar/jruby/1.6.0/jruby/bin/buildr:19:in `(root)'
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message