Class: Maven::Ruby::Maven
- Inherits:
-
Object
- Object
- Maven::Ruby::Maven
- Defined in:
- lib/ruby/maven/ruby/maven.rb
Class Method Summary collapse
Instance Method Summary collapse
- #exec(*args) ⇒ Object
- #exec_in(launchdirectory, *args) ⇒ Object
- #options ⇒ Object
- #property(key, value = nil) ⇒ Object
- #verbose ⇒ Object
- #verbose=(v) ⇒ Object
Class Method Details
.class_world ⇒ Object
28 29 30 |
# File 'lib/ruby/maven/ruby/maven.rb', line 28 def self.class_world @class_world ||= class_world! end |
.maven_home ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/ruby/maven/ruby/maven.rb', line 72 def self.maven_home @maven_home = File.(File.join(File.dirname(__FILE__), '..', '..', '..', '..')) end |
Instance Method Details
#exec(*args) ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/ruby/maven/ruby/maven.rb', line 100 def exec(*args) puts "PWD: #{File.('.')}" if verbose a = args.dup + a.flatten! puts "mvn #{a.join(' ')}" if verbose if defined? JRUBY_VERSION puts "using jruby #{JRUBY_VERSION}" if verbose launch_jruby(a) else puts "using java" if verbose launch_java(a) end end |
#exec_in(launchdirectory, *args) ⇒ Object
114 115 116 117 118 119 120 |
# File 'lib/ruby/maven/ruby/maven.rb', line 114 def exec_in(launchdirectory, *args) succeeded = nil Dir.chdir(launchdirectory) do succeeded = exec(args) end succeeded end |
#options ⇒ Object
80 81 82 |
# File 'lib/ruby/maven/ruby/maven.rb', line 80 def @options ||= {} end |
#property(key, value = nil) ⇒ Object
88 89 90 |
# File 'lib/ruby/maven/ruby/maven.rb', line 88 def property(key, value = nil) ["-D#{key}"] = value end |
#verbose ⇒ Object
92 93 94 95 96 97 98 |
# File 'lib/ruby/maven/ruby/maven.rb', line 92 def verbose if @verbose.nil? @verbose = .delete('-Dverbose').to_s == 'true' else @verbose end end |
#verbose=(v) ⇒ Object
84 85 86 |
# File 'lib/ruby/maven/ruby/maven.rb', line 84 def verbose= v @verbose = v end |