Title: [741] trunk/rails-integration/plugins/goldspike/lib: #13963 Fix include_library, patch from Daniel Einspanjer
- Revision
- 741
- Author
- tantalon
- Date
- 2007-09-15 18:18:04 -0400 (Sat, 15 Sep 2007)
Log Message
#13963 Fix include_library, patch from Daniel Einspanjer
Modified Paths
Diff
Modified: trunk/rails-integration/plugins/goldspike/lib/java_library.rb (740 => 741)
--- trunk/rails-integration/plugins/goldspike/lib/java_library.rb 2007-09-11 06:35:49 UTC (rev 740)
+++ trunk/rails-integration/plugins/goldspike/lib/java_library.rb 2007-09-15 22:18:04 UTC (rev 741)
@@ -15,13 +15,7 @@
@config = config
@name = name
@version = version
- check_locations = local_locations(name, version)
-
- if locations.is_a?(String)
- locations = [ locations ]
- end
- check_locations += locations
- @locations = check_locations
+ @locations = local_locations(name, version)
end
def file
@@ -91,12 +85,12 @@
WLog.debug("locations for " + name + " " + version);
paths = []
if config.local_java_lib
- paths << File.join(local_java_lib, "#{name}-#{version}.#{type}")
- paths << File.join(local_java_lib, "#{name}.#{type}")
+ paths << File.join(config.local_java_lib, "#{name}-#{version}.#{type}")
+ paths << File.join(config.local_java_lib, "#{name}.#{type}")
end
if config.jruby_home
- paths << File.join(jruby_home, 'lib', "#{name}-#{version}.#{type}")
- paths << File.join(jruby_home, 'lib', "#{name}.#{type}")
+ paths << File.join(config.jruby_home, 'lib', "#{name}-#{version}.#{type}")
+ paths << File.join(config.jruby_home, 'lib', "#{name}.#{type}")
end
WLog.debug("paths: " + paths.join("\n"))
return paths
Modified: trunk/rails-integration/plugins/goldspike/lib/war_config.rb (740 => 741)
--- trunk/rails-integration/plugins/goldspike/lib/war_config.rb 2007-09-11 06:35:49 UTC (rev 740)
+++ trunk/rails-integration/plugins/goldspike/lib/war_config.rb 2007-09-15 22:18:04 UTC (rev 741)
@@ -279,15 +279,12 @@
end
# method hook for library property
- def include_library(name, properties)
- if properties == nil or properties[:version] == nil or properties[:locations] == nil
- WLog.warn "in include_library #{name}, 'version' and 'locations' specifications are mandatory"
- return
- end
+ def include_library(name, version)
begin
- @result.add_java_library(@result.java_library(name, properties[:version], properties[:locations]))
+ @result.add_library(@result.java_library(name, version))
rescue
- WLog.warn "couldn't load library #{name}, check library definition in the config file"
+ WLog.warn "couldn't load library #{name}-#{version}.jar, check library definition in the config file"
+ WLog.debug $!
end
end
@@ -297,6 +294,7 @@
@result.add_library(@result.maven_library(group, name, version))
rescue
WLog.warn "couldn't load maven library #{name}, check library definition in the config file"
+ WLog.debug $!
end
end
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel