Class: Bee::Task::BaseDependencyResolver
- Inherits:
-
Object
- Object
- Bee::Task::BaseDependencyResolver
- Includes:
- Util::BuildErrorMixin
- Defined in:
- lib/dependency_resolver.rb
Overview
Parent of all dependency resolvers.
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_REPOSITORY =
Default repository.
nil
- DEFAULT_CACHE =
Default cache location.
nil
Instance Method Summary collapse
-
#classpath ⇒ Object
Return the classpath.
-
#dependencies ⇒ Object
Return dependencies as a list.
-
#initialize(file, scope, verbose = false) ⇒ BaseDependencyResolver
constructor
Constructor: - file: dependency file (should be maven.xml).
Constructor Details
#initialize(file, scope, verbose = false) ⇒ BaseDependencyResolver
Constructor:
-
file: dependency file (should be maven.xml).
-
scope: the scope for dependencies (compile, runtime or test).
-
verbose: tells if we should be verbose.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/dependency_resolver.rb', line 40 def initialize(file, scope, verbose=false) @file = file @scope = scope @verbose = verbose @repositories = parse_repositories @cache = DEFAULT_CACHE @dependencies = nil # print information if verbose puts "Repositories: #{@repositories.join(', ')}" if @verbose end |
Instance Method Details
#classpath ⇒ Object
Return the classpath.
52 53 54 |
# File 'lib/dependency_resolver.rb', line 52 def classpath return dependencies.join(File::PATH_SEPARATOR) end |
#dependencies ⇒ Object
Return dependencies as a list.
57 58 59 60 61 62 63 |
# File 'lib/dependency_resolver.rb', line 57 def dependencies synchronize dependencies = @dependencies.map do |dependency| build_path(@cache, dependency) end return dependencies end |