Class: Maven::Plugin
Instance Attribute Summary collapse
-
#artifact_id ⇒ Object
Returns the value of attribute artifact_id.
-
#description ⇒ Object
Returns the value of attribute description.
-
#goal_prefix ⇒ Object
Returns the value of attribute goal_prefix.
-
#goals ⇒ Object
Returns the value of attribute goals.
-
#group_id ⇒ Object
Returns the value of attribute group_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name) ⇒ Plugin
constructor
A new instance of Plugin.
- #prepare ⇒ Object
- #process(line) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(name) ⇒ Plugin
Returns a new instance of Plugin.
283 284 285 |
# File 'lib/maven.rb', line 283 def initialize(name) @name = name end |
Instance Attribute Details
#artifact_id ⇒ Object
Returns the value of attribute artifact_id.
280 281 282 |
# File 'lib/maven.rb', line 280 def artifact_id @artifact_id end |
#description ⇒ Object
Returns the value of attribute description.
279 280 281 |
# File 'lib/maven.rb', line 279 def description @description end |
#goal_prefix ⇒ Object
Returns the value of attribute goal_prefix.
280 281 282 |
# File 'lib/maven.rb', line 280 def goal_prefix @goal_prefix end |
#goals ⇒ Object
Returns the value of attribute goals.
281 282 283 |
# File 'lib/maven.rb', line 281 def goals @goals end |
#group_id ⇒ Object
Returns the value of attribute group_id.
280 281 282 |
# File 'lib/maven.rb', line 280 def group_id @group_id end |
#name ⇒ Object
Returns the value of attribute name.
279 280 281 |
# File 'lib/maven.rb', line 279 def name @name end |
#version ⇒ Object
Returns the value of attribute version.
280 281 282 |
# File 'lib/maven.rb', line 280 def version @version end |
Instance Method Details
#prepare ⇒ Object
287 288 289 290 |
# File 'lib/maven.rb', line 287 def prepare super goals.each{|goal| goal.prepare} end |
#process(line) ⇒ Object
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/maven.rb', line 292 def process(line) case @status || :none when :none skip_to(/^#{'-' * 40}/, :header) when :header self.until(line, /^Description\:/, :description) do key, value = *line.split(':', 2) words = *key.split(' ') send("#{words.map{|s|s.downcase}.join('_')}=", value.strip) end when :description self.until(line, /^Mojos\:/, :to_mojos) do self.description ||= [] self.description << line.strip end when :to_mojos skip_to(/^#{'=' * 40}/, :goals) when :goals if /^Goal\: \'(.*)\'/ =~ line goal = Goal.new(self, $1) self.goals ||= [] self.goals << goal goal else self end else raise "unimplemented" end end |