Class: Jrmvnrunner::Dsl::Pom
- Inherits:
-
Object
- Object
- Jrmvnrunner::Dsl::Pom
- Defined in:
- lib/jrmvnrunner/dsl.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#repositories ⇒ Object
readonly
Returns the value of attribute repositories.
Instance Method Summary collapse
-
#initialize ⇒ Pom
constructor
A new instance of Pom.
- #jar(path) ⇒ Object
- #source(path) ⇒ Object
Constructor Details
#initialize ⇒ Pom
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
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
8 9 10 |
# File 'lib/jrmvnrunner/dsl.rb', line 8 def dependencies @dependencies end |
#repositories ⇒ Object (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 |