2017-08-01 41 views
0

我需要从源码构建Apache ODE 1.3.5。从源代码构建对我来说很重要,因为我们打算对ODE代码进行一些更改。我尝试了他们的instructions建设。我能够安装jruby 1.5.1,但我无法安装buildr 1.4.4使用上述版本的jruby。我GOOGLE了一下,似乎我不得不升级到jruby 1.6.2。的jruby(1.6.2)的新版本后,我能安装buildr 1.4.4,但是当我去ODE源的根,执行以下命令从源码Jruby和Buildr构建apache ODE

buildr package test=no 

我得到的控制台

在以下例外情况
LoadError: no such file to load -- rubygems/source_info_cache 
    require at org/jruby/RubyKernel.java:1038 
    require at c:/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 
    (root) at c:/jruby-1.6.2/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr/core/application.rb:41 
    require at org/jruby/RubyKernel.java:1038 
    require at c:/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 
    (root) at c:/jruby-1.6.2/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr/core/application.rb:17 
    require at org/jruby/RubyKernel.java:1038 
    require at c:/jruby-1.6.2/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr/core.rb:29 
    (root) at c:/jruby-1.6.2/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr.rb:20 
    require at org/jruby/RubyKernel.java:1038 
    require at c:/jruby-1.6.2/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr.rb:29 
    (root) at c:/jruby-1.6.2/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/bin/buildr:18 
    load at org/jruby/RubyKernel.java:1063 
    (root) at c:\jruby-1.6.2\bin\buildr:19 

我不知道我在做什么错。这是我与jruby以及buildr的第一次互动。我赞赏任何建立这个知识库的指针。

编辑1:下面是jruby -S gem list安装jruby 1.7.13buildr 1.4.19

C:\Users\16030053.CS-6606-DT>jruby -S gem list 

*** LOCAL GEMS *** 

atoulme-Antwrap (0.7.5 java) 
bouncy-castle-java (1.5.0147) 
builder (3.2.2) 
buildr (1.4.19 java) 
bundler (1.15.3) 
diff-lcs (1.2.4) 
ffi (1.9.3 java) 
hoe (3.7.1) 
jruby-openssl (0.9.5 java, 0.8.10) 
jruby-pageant (1.1.1 java) 
jruby-win32ole (0.8.5) 
json (1.8.0 java) 
json_pure (1.8.0) 
krypt (0.0.2) 
krypt-core (0.0.2 universal-java) 
krypt-provider-jdk (0.0.2) 
minitar (0.5.4) 
net-sftp (2.1.2) 
net-ssh (2.7.0) 
orderedhash (0.0.6) 
rake (10.1.0, 0.9.2.2) 
rdoc (4.0.1) 
rspec (2.14.1) 
rspec-core (2.14.5) 
rspec-expectations (2.14.3) 
rspec-mocks (2.14.3) 
rubyzip (0.9.9) 
xml-simple (1.1.2) 

C:\Users\16030053.CS-6606-DT> 

编辑2后的结果。当我在apache-ode-sources-1.3.5执行命令buildr package test=no --trace,我收到以下错误

F:\apache-ode-sources-1.3.5>buildr package test=no --trace 
Buildr aborted! 
SyntaxError : F:/apache-ode-sources-1.3.5/tasks/jbi.rake:79: formal argument cannot be an instance variable 
     Tempfile.open("MANIFEST.MF") { |@jbi_xml_tmp| @jbi_xml_tmp.write descriptor } 
               ^
org/jruby/RubyKernel.java:1081:in `load' 
c:/jruby-1.7.13/lib/ruby/gems/shared/gems/buildr-1.4.19-java/lib/buildr/core/application.rb:1:in `(root)' 
org/jruby/RubyArray.java:1613:in `each' 
c:/jruby-1.7.13/lib/ruby/gems/shared/gems/buildr-1.4.19-java/lib/buildr/core/application.rb:497:in `load_tasks' 
c:/jruby-1.7.13/lib/ruby/gems/shared/gems/buildr-1.4.19-java/lib/buildr/core/application.rb:494:in `load_tasks' 
c:/jruby-1.7.13/lib/ruby/gems/shared/gems/buildr-1.4.19-java/lib/buildr/core/application.rb:224:in `load_buildfile' 
c:/jruby-1.7.13/lib/ruby/gems/shared/gems/buildr-1.4.19-java/lib/buildr/core/application.rb:535:in `standard_exception_handling' 
c:/jruby-1.7.13/lib/ruby/gems/shared/gems/buildr-1.4.19-java/lib/buildr/core/application.rb:220:in `load_buildfile' 
c:/jruby-1.7.13/lib/ruby/gems/shared/gems/buildr-1.4.19-java/lib/buildr/core/application.rb:130:in `run' 
c:/jruby-1.7.13/lib/ruby/gems/shared/gems/buildr-1.4.19-java/lib/buildr/core/application.rb:535:in `standard_exception_handling' 
c:/jruby-1.7.13/lib/ruby/gems/shared/gems/buildr-1.4.19-java/lib/buildr/core/application.rb:128:in `run' 
org/jruby/RubyKernel.java:1081:in `load' 
c:\jruby-1.7.13\bin\buildr:23:in `(root)' 

F:\apache-ode-sources-1.3.5> 
+0

你能使用JRuby 1.7.13和1.4.19 buildr尝试 你可以执行这个命令并安装上述版本 的JRuby -S宝石列表 – Sathwik

+0

@Sathwik与上述输出更新的问题后分享命令 –

回答

0

以下是@sathwik对的回复10邮件列表,帮助我编译颂源1.3.5

穆罕默德嗨版本,

使用JRuby的1.7.13和1.4.19 buildr

编辑文件<ode 1.3.5 source>/tasks/jbi.rake。查找和下面

def initialize(*args) 
    super 
    prepare { path("lib").include((component.libs + 
bootstrap.libs).flatten.uniq) } 

    enhance do 
     case jbi_xml 
     when String 
     path("META-INF").include jbi_xml.path, :as=>"jbi.xml" 
     when nil, true 
     # Tempfiles gets deleted on garbage collection, so we're going to 
hold on to it 
     # through instance variable not closure variable. 
     @jbi_xml_tmp = Tempfile.new('MANIFEST.MF') 
     @jbi_xml_tmp.write descriptor 
     path("META-INF").include @jbi_xml_tmp.path, :as=>"jbi.xml" 
     @jbi_xml_tmp.close 
     when Proc, Method 
     @jbi_xml_tmp = Tempfile.new('MANIFEST.MF') 
     @jbi_xml_tmp.write jbi_xml.call.to_s 
     path("META-INF").include @jbi_xml_tmp.path, :as=>"jbi.xml" 
     @jbi_xml_tmp.close 
     end 
    end 
    end 

内容替换 初始化方法除了上述变化外,我不得不线37 dependencies.rb 文件从

AXIS2_WAR   = "org.apache.axis2:axis2-webapp:war:1.3" to 

AXIS2_WAR   = "org.apache.axis2:axis2-webapp:war:1.6.2" 

需要上述变化,因为包含所有存储库更改 参考axis2-webapp:war:1.3已关闭。此外,你需要 添加以下的repositories.rb文件

repositories.remote << "http://people.apache.org/~vanto/m2/" 

这是需要履行必需的依赖即 xdoclet:xjavadoc-1.1-j5的一个端线。