Class: Jars::MavenFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/jars/maven_factory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = nil, debug = Jars.debug?, verbose = Jars.verbose?) ⇒ MavenFactory

Returns a new instance of MavenFactory.


8
9
10
11
12
13
# File 'lib/jars/maven_factory.rb', line 8

def initialize( options = nil,  debug = Jars.debug?, verbose = Jars.verbose? )
  @options = (options || {}).dup
  @options.delete( :ignore_dependencies )
  @debug = debug
  @verbose = verbose
end

Instance Attribute Details

#debugObject (readonly)

Returns the value of attribute debug.


6
7
8
# File 'lib/jars/maven_factory.rb', line 6

def debug
  @debug
end

#verboseObject (readonly)

Returns the value of attribute verbose.


6
7
8
# File 'lib/jars/maven_factory.rb', line 6

def verbose
  @verbose
end

Instance Method Details

#maven_new(pom) ⇒ Object


15
16
17
18
19
20
21
22
# File 'lib/jars/maven_factory.rb', line 15

def maven_new( pom )
  lazy_load_maven
  maven = setup( Maven::Ruby::Maven.new )

  # TODO copy pom to tmp dir in case it is not a real file
  maven.options[ '-f' ] = pom
  maven
end