Title: [504] trunk/rails-integration/plugins/war-snapshot/lib/packer.rb: Fixing preparsing
- Revision
- 504
- Author
- tantalon
- Date
- 2007-04-26 05:41:17 -0400 (Thu, 26 Apr 2007)
Log Message
Fixing preparsing
Modified Paths
Diff
Modified: trunk/rails-integration/plugins/war-snapshot/lib/packer.rb (503 => 504)
--- trunk/rails-integration/plugins/war-snapshot/lib/packer.rb 2007-04-25 18:41:07 UTC (rev 503)
+++ trunk/rails-integration/plugins/war-snapshot/lib/packer.rb 2007-04-26 09:41:17 UTC (rev 504)
@@ -31,10 +31,12 @@
return unless config.compile_ruby
# find the libraries
classpath_files = Rake::FileList.new(File.join(config.staging, 'WEB-INF', 'lib', '*.jar'))
- classpath = classpath_files.to_a.join(config.os_path_separator)
+ classpath_files_array = classpath_files.to_a
+ classpath_files_array.collect! {|f| File.expand_path(f) }
+ classpath = classpath_files_array.join(config.os_path_separator)
# compile the files
os_dir = dir.gsub(File::SEPARATOR, config.os_separator)
- unless system("java -cp #{classpath} org.jruby.webapp.ASTSerializerMain #{'--replace' unless config.keep_source} #{os_dir}")
+ unless system("cd #{os_dir} && java -cp #{classpath} org.jruby.webapp.ASTSerializerMain #{'--replace' unless config.keep_source}")
raise "Error: failed to preparse files in #{dir}, returned with error code #{$?}"
end
end
@@ -115,7 +117,7 @@
gem_files = Rake::FileList.new(File.join(gem.full_gem_path, '**', '*'))
copy_tree(gem_files, gem_target, gem.full_gem_path)
# compile the .rb files to .rb.ast.ser
- compile_tree(gem_target,config)
+ compile_tree(File.join(gem_target, 'lib'), config)
end
# handle dependencies
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel