Class: Cerberus::Builder::Maven2
- Inherits:
-
Object
- Object
- Cerberus::Builder::Maven2
- Defined in:
- lib/cerberus/builder/maven2.rb
Instance Attribute Summary collapse
-
#brokeness ⇒ Object
readonly
Returns the value of attribute brokeness.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(config) ⇒ Maven2
constructor
A new instance of Maven2.
- #run ⇒ Object
- #successful? ⇒ Boolean
Constructor Details
#initialize(config) ⇒ Maven2
Returns a new instance of Maven2.
6 7 8 |
# File 'lib/cerberus/builder/maven2.rb', line 6 def initialize(config) @config = config end |
Instance Attribute Details
#brokeness ⇒ Object (readonly)
Returns the value of attribute brokeness.
4 5 6 |
# File 'lib/cerberus/builder/maven2.rb', line 4 def brokeness @brokeness end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
4 5 6 |
# File 'lib/cerberus/builder/maven2.rb', line 4 def output @output end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/cerberus/builder/maven2.rb', line 10 def run cmd = @config[:builder, :maven2, :cmd] || 'mvn' task = @config[:builder, :maven2, :task] || 'test' @output = `#{@config[:bin_path]}#{cmd} #{system_properties} #{settings} #{task} 2>&1` add_error_information successful? end |
#successful? ⇒ Boolean
18 19 20 |
# File 'lib/cerberus/builder/maven2.rb', line 18 def successful? $?.exitstatus == 0 and not @output.include?('[ERROR] BUILD FAILURE') end |