我需要从源代码构建Apache ODE 1.3.5。从源代码构建对我来说非常重要,因为我们计划在ODE
代码中进行一些更改。我试了他们的instructions来建造。我能够安装jruby
1.5.1但我无法使用buildr
的上述版本安装jruby
1.4.4。我用Google搜索了一下,似乎我必须升级到jruby 1.6.2
。在较新版本的jruby
(1.6.2)之后,我能够安装buildr 1.4.4
但是当我转到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.13
buildr 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 当我在buildr package test=no --trace
执行命令apache-ode-sources-1.3.5
时,出现以下错误
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 :(得分:0)
以下是@sathwik对apache-ode
邮件列表的响应,该列表帮助我编译版本1.3.5
的颂歌来源
Hi Muhammad,
使用jruby 1.7.13和buildr 1.4.19
修改档案
<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
除了上述更改外,我还必须更改
dependencies.rb
的第37行 文件来自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
。