Skip to content
This repository
Browse code

use java.io.file for parsing local_repository config

  • Loading branch information...
commit a64dab577891c065e51bf2af2fba80480457c3c4 1 parent d833687
Stefan Novak slnovak authored

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. +7 7 lib/jbundler/aether.rb
14 lib/jbundler/aether.rb
@@ -28,7 +28,7 @@ class AetherRuby
28 28 def self.setup_classloader
29 29 require 'java'
30 30
31   - maven_home = File.dirname(File.dirname(Gem.bin_path('ruby-maven',
  31 + maven_home = File.dirname(File.dirname(Gem.bin_path('ruby-maven',
32 32 'rmvn')))
33 33 # TODO reduce to the libs which are really needed
34 34 Dir.glob(File.join(maven_home, 'lib', "*jar")).each {|path| require path }
@@ -55,7 +55,7 @@ def initialize( config = Config.new )
55 55 @aether.add_mirror( config.mirror ) if config.mirror
56 56 @aether.offline = config.offline
57 57 @aether.user_settings = config.settings if config.settings
58   - @aether.local_repository = config.local_repository if config.local_repository
  58 + @aether.local_repository = java.io.File.new(config.local_repository) if config.local_repository
59 59 rescue NativeException => e
60 60 e.cause.print_stack_trace
61 61 raise e
@@ -82,18 +82,18 @@ def resolve
82 82 raise e
83 83 end
84 84
85   - def classpath
  85 + def classpath
86 86 if artifacts.empty?
87 87 ''
88 88 else
89 89 @aether.classpath
90 90 end
91 91 end
92   -
  92 +
93 93 def classpath_array
94 94 classpath.split(/#{File::PATH_SEPARATOR}/)
95 95 end
96   -
  96 +
97 97 def repositories
98 98 @aether.repositories
99 99 end
@@ -116,6 +116,6 @@ def install(coordinate, file)
116 116 e.cause.print_stack_trace
117 117 raise e
118 118 end
119   -
  119 +
120 120 end
121   -end
  121 +end

0 comments on commit a64dab5

Please sign in to comment.
Something went wrong with that request. Please try again.