Class: Jrmvnrunner::Dsl::Pom

Inherits:
Object
  • Object
show all
Defined in:
lib/jrmvnrunner/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePom

Returns a new instance of Pom.



10
11
12
13
# File 'lib/jrmvnrunner/dsl.rb', line 10

def initialize
  @repositories = []
  @dependencies = []
end

Instance Attribute Details

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



8
9
10
# File 'lib/jrmvnrunner/dsl.rb', line 8

def dependencies
  @dependencies
end

#repositoriesObject (readonly)

Returns the value of attribute repositories.



7
8
9
# File 'lib/jrmvnrunner/dsl.rb', line 7

def repositories
  @repositories
end

Instance Method Details

#jar(path) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/jrmvnrunner/dsl.rb', line 15

def jar(path)
  path = path.split(':')
  @dependencies << {
      :group_id => path[0],
      :artifact_id => path[1],
      :version => path[2],
      :type => path[3] || 'jar',
      :classifier => path[4]
  }
end

#source(path) ⇒ Object



26
27
28
29
30
31
# File 'lib/jrmvnrunner/dsl.rb', line 26

def source(path)
  @repositories << {
      :name => path,
      :url => path,
  }
end