Class: Source::Maven::Factory

Inherits:
Base::Factory show all
Defined in:
lib/gpm/source/maven.rb

Constant Summary

Constants inherited from Base::Factory

Base::Factory::GLOB_REGEXP

Instance Attribute Summary

Attributes inherited from Base::Factory

#directory

Attributes included from HasOptionMethods

#options

Instance Method Summary collapse

Methods inherited from Base::Factory

#files_provider

Methods included from HasOptionMethods

included

Constructor Details

#initialize(pomfile, options = {}) ⇒ Factory

Returns a new instance of Factory.



49
50
51
52
53
# File 'lib/gpm/source/maven.rb', line 49

def initialize(pomfile, options={})
  @pomfile = File.expand_path(pomfile)
  @effective_pom_file_reader = effective_pom_file_reader_class.new(@pomfile, options)
  super(File.dirname(@pomfile),options)
end

Instance Method Details

#createObject



59
60
61
# File 'lib/gpm/source/maven.rb', line 59

def create
  Maven.new(files_provider,options,@effective_pom_file_reader)
end

#effective_pom_file_reader_classObject



55
56
57
# File 'lib/gpm/source/maven.rb', line 55

def effective_pom_file_reader_class
  PomFileReader
end

#files_providersObject



63
64
65
# File 'lib/gpm/source/maven.rb', line 63

def files_providers
  super + [FilesFromDirectoryProvider.new(directory, [File.basename(@pomfile)])]
end