mirror of https://github.com/apache/maven.git
o some jruby integration. I will integrate what Eric has made but this allows for some easy experiments with the embedder
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@543754 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cc5f2f954b
commit
e8fc77cccd
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
export M2_HOME=$HOME/m2
|
||||
export JRUBY_HOME=$HOME/jruby
|
||||
export CLASSPATH=$M2_HOME/lib/maven-embedder-2.1-SNAPSHOT-uber.jar
|
||||
$JRUBY_HOME/bin/jruby $M2_HOME/bin/mvnr.rb
|
|
@ -0,0 +1,23 @@
|
|||
require 'java'
|
||||
|
||||
class Maven
|
||||
def initialize goals
|
||||
@goals = goals
|
||||
end
|
||||
|
||||
include_class 'java.io.File'
|
||||
include_class 'org.apache.maven.embedder.MavenEmbedder'
|
||||
include_class 'org.apache.maven.embedder.DefaultConfiguration'
|
||||
include_class 'org.apache.maven.execution.DefaultMavenExecutionRequest'
|
||||
|
||||
def run
|
||||
configuration = DefaultConfiguration.new
|
||||
maven = MavenEmbedder.new(configuration)
|
||||
r = DefaultMavenExecutionRequest.new
|
||||
r.setBaseDirectory( File.new( "." ) )
|
||||
r.setGoals( @goals )
|
||||
result = maven.execute( r );
|
||||
end
|
||||
end
|
||||
|
||||
m = Maven.new( ["clean"] ).run
|
Loading…
Reference in New Issue