Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update parsing local_repository via environment/config. #14

Merged
merged 1 commit into from

2 participants

@slnovak

When trying to specify my own local_repository location, Aether was trying to parse the string input as a file. It looks like we cannot use the String override of Aether::setLocalRepository and must cast our String to a Java.io.File object.

@mkristian mkristian merged commit 7bd9de4 into mkristian:master

1 check passed

Details default The Travis build passed
@mkristian
Owner

thanx, maybe I should see if this config part can be tested easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/jbundler/aether.rb
View
14 lib/jbundler/aether.rb
@@ -28,7 +28,7 @@ class AetherRuby
def self.setup_classloader
require 'java'
- maven_home = File.dirname(File.dirname(Gem.bin_path('ruby-maven',
+ maven_home = File.dirname(File.dirname(Gem.bin_path('ruby-maven',
'rmvn')))
# TODO reduce to the libs which are really needed
Dir.glob(File.join(maven_home, 'lib', "*jar")).each {|path| require path }
@@ -55,7 +55,7 @@ def initialize( config = Config.new )
@aether.add_mirror( config.mirror ) if config.mirror
@aether.offline = config.offline
@aether.user_settings = config.settings if config.settings
- @aether.local_repository = config.local_repository if config.local_repository
+ @aether.local_repository = java.io.File.new(config.local_repository) if config.local_repository
rescue NativeException => e
e.cause.print_stack_trace
raise e
@@ -82,18 +82,18 @@ def resolve
raise e
end
- def classpath
+ def classpath
if artifacts.empty?
''
else
@aether.classpath
end
end
-
+
def classpath_array
classpath.split(/#{File::PATH_SEPARATOR}/)
end
-
+
def repositories
@aether.repositories
end
@@ -116,6 +116,6 @@ def install(coordinate, file)
e.cause.print_stack_trace
raise e
end
-
+
end
-end
+end
Something went wrong with that request. Please try again.