Class: Jars::MavenFactory

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

Defined Under Namespace

Modules: AttachJars

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.



41
42
43
44
45
46
47
# File 'lib/jars/maven_factory.rb', line 41

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

Instance Attribute Details

#debugObject (readonly)

Returns the value of attribute debug.



39
40
41
# File 'lib/jars/maven_factory.rb', line 39

def debug
  @debug
end

#verboseObject (readonly)

Returns the value of attribute verbose.



39
40
41
# File 'lib/jars/maven_factory.rb', line 39

def verbose
  @verbose
end

Instance Method Details

#maven_new(pom) ⇒ Object



49
50
51
52
53
54
55
56
57
# File 'lib/jars/maven_factory.rb', line 49

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

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