Module: Maven
- Defined in:
- lib/maven.rb
Constant Summary collapse
- VERSION =
'3.9.9'.freeze
Class Method Summary collapse
- .bin(file = nil) ⇒ Object
- .boot ⇒ Object
- .conf ⇒ Object
- .exec(*args) ⇒ Object
- .home ⇒ Object
- .lib ⇒ Object
Class Method Details
.bin(file = nil) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/maven.rb', line 23 def self.bin( file = nil ) if file File.join( path( 'bin' ), file ) else path( 'bin' ) end end |
.boot ⇒ Object
39 40 41 |
# File 'lib/maven.rb', line 39 def self.boot path( 'boot' ) end |
.conf ⇒ Object
35 36 37 |
# File 'lib/maven.rb', line 35 def self.conf path( 'conf' ) end |
.exec(*args) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/maven.rb', line 5 def self.exec( *args ) if args.member?( '-Dverbose=true' ) || args.member?( '-Dverbose' ) || args.member?( '-X' ) puts "mvn #{args.join(' ')}" end old_maven_home = ENV['M2_HOME'] ENV['M2_HOME'] = home system "#{Maven.bin( 'mvn' )} #{args.join( ' ' )}" ensure ENV['M2_HOME'] = old_maven_home end |
.home ⇒ Object
16 17 18 19 20 21 |
# File 'lib/maven.rb', line 16 def self.home @home ||= begin dir = File.dirname( File.( __FILE__ ) ) File.( "#{dir}/../maven-home" ) end end |
.lib ⇒ Object
31 32 33 |
# File 'lib/maven.rb', line 31 def self.lib path( 'lib' ) end |