Class: JBundler::MavenNG
- Inherits:
-
Object
- Object
- JBundler::MavenNG
- Defined in:
- lib/jbundler/maven.rb
Overview
mimic the new maven class - prepare for upgrade
Instance Method Summary collapse
- #exec(*args) ⇒ Object
-
#initialize(project, temp_pom = nil) ⇒ MavenNG
constructor
A new instance of MavenNG.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(project, temp_pom = nil) ⇒ MavenNG
Returns a new instance of MavenNG.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/jbundler/maven.rb', line 7 def initialize( project, temp_pom = nil ) f = File.( File.join( temp_pom || '.pom.xml' ) ) v = ::Maven::Tools::Visitor.new( File.open( f, 'w' ) ) # parse block and write out pom4rake.xml file v.accept_project( project ) # tell maven to use the generated file @rmvn = ::Maven::Ruby::Maven.new @rmvn.[ '-f' ] = f @rmvn.[ '-B' ] = nil end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
22 23 24 |
# File 'lib/jbundler/maven.rb', line 22 def method_missing( method, *args ) @rmvn.exec( [ method ] + args ) end |
Instance Method Details
#exec(*args) ⇒ Object
18 19 20 |
# File 'lib/jbundler/maven.rb', line 18 def exec( *args ) @rmvn.exec_in( File.( '.' ), *args ) end |