Modified: trunk/rails-integration/plugins/goldspike-snapshot/lib/java_library.rb (585 => 586)
--- trunk/rails-integration/plugins/goldspike-snapshot/lib/java_library.rb 2007-05-13 12:50:37 UTC (rev 585)
+++ trunk/rails-integration/plugins/goldspike-snapshot/lib/java_library.rb 2007-05-14 20:23:00 UTC (rev 586)
@@ -9,12 +9,11 @@
module War
class JavaLibrary
- attr_accessor :artifact, :version, :locations, :config
+ attr_accessor :name, :version, :locations, :config
- def initialize(artifact, version, config)
- WLog.debug("intializing library " + artifact)
+ def initialize(name, version, config)
@config = config
- @artifact = artifact
+ @name = name
@version = version
check_locations = local_locations(name, version)
@@ -26,7 +25,7 @@
end
def file
- "#{artifact}-#{version}.jar"
+ "#{name}-#{version}.jar"
end
def install(config, target_file)
@@ -85,20 +84,19 @@
end
def to_s
- "#{artifact}-#{version}"
+ "#{name}-#{version}"
end
-
-
- def local_locations(artifact, version, type='jar')
- WLog.debug("locations for " + artifact + " " + version);
+
+ def local_locations(name, version, type='jar')
+ WLog.debug("locations for " + name + " " + version);
paths = []
if config.local_java_lib
- paths << File.join(local_java_lib, "#{artifact}-#{version}.#{type}")
- paths << File.join(local_java_lib, "#{artifact}.#{type}")
+ paths << File.join(local_java_lib, "#{name}-#{version}.#{type}")
+ paths << File.join(local_java_lib, "#{name}.#{type}")
end
if config.jruby_home
- paths << File.join(jruby_home, 'lib', "#{artifact}-#{version}.#{type}")
- paths << File.join(jruby_home, 'lib', "#{artifact}.#{type}")
+ paths << File.join(jruby_home, 'lib', "#{name}-#{version}.#{type}")
+ paths << File.join(jruby_home, 'lib', "#{name}.#{type}")
end
WLog.debug("paths: " + paths.join("\n"))
return paths
@@ -113,10 +111,13 @@
def initialize (group, name, version, config)
@config = config
@group = group
+ @name = name
+ @version = version
@locations = maven_locations(group, name, version)
end
def maven_locations(group, artifact, version, type='jar')
+ WLog.debug("locations for " + group + " " + artifact + " " + version);
paths = []
maven_local_repository = config.maven_local_repository
maven_remote_repository = config.maven_remote_repository
@@ -126,11 +127,11 @@
if maven_remote_repository
paths << "#{maven_remote_repository}/#{group.gsub('.', '/')}/#{artifact}/#{version}/#{artifact}-#{version}.#{type}"
end
+ WLog.debug("paths: " + paths.join("\n"))
return paths
end
end
-
end #module
\ No newline at end of file