Class: JBundler::PomRunner
- Inherits:
-
Object
- Object
- JBundler::PomRunner
show all
- Defined in:
- lib/jbundler/pom_runner.rb
Instance Method Summary
collapse
Constructor Details
#initialize(config) ⇒ PomRunner
Returns a new instance of PomRunner.
6
7
8
|
# File 'lib/jbundler/pom_runner.rb', line 6
def initialize( config )
@config = config
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object
10
11
12
13
|
# File 'lib/jbundler/pom_runner.rb', line 10
def method_missing( m, *args )
result = @config[ m ] || @config[ m.to_s ]
result.nil? ? super : result
end
|
Instance Method Details
#basedir ⇒ Object
36
37
38
|
# File 'lib/jbundler/pom_runner.rb', line 36
def basedir
File.expand_path( '.' )
end
|
#clean? ⇒ Boolean
57
58
59
|
# File 'lib/jbundler/pom_runner.rb', line 57
def clean?
@config[ 'clean' ] || false
end
|
#debug ⇒ Object
49
50
51
|
# File 'lib/jbundler/pom_runner.rb', line 49
def debug
@config[ 'debug' ] || false
end
|
#exec(*args) ⇒ Object
65
66
67
68
69
|
# File 'lib/jbundler/pom_runner.rb', line 65
def exec( *args )
maven.options[ '-f' ] ||= pom_file
args.unshift :clean if clean?
maven.exec( *args )
end
|
#maven ⇒ Object
32
33
34
|
# File 'lib/jbundler/pom_runner.rb', line 32
def maven
@m ||= maven_new
end
|
#pom_file ⇒ Object
61
62
63
|
# File 'lib/jbundler/pom_runner.rb', line 61
def pom_file
raise 'overwrite this method'
end
|
#verbose ⇒ Object
53
54
55
|
# File 'lib/jbundler/pom_runner.rb', line 53
def verbose
@config[ 'verbose' ] || false
end
|
#work_dir ⇒ Object
44
45
46
47
|
# File 'lib/jbundler/pom_runner.rb', line 44
def work_dir
workdir || 'pkg'
end
|
#workdir ⇒ Object
40
41
42
|
# File 'lib/jbundler/pom_runner.rb', line 40
def workdir
@config[ 'workdir' ]
end
|