mirror of https://github.com/apache/maven.git
o a tiny hack to make sure that the assembly JAR with everything it in works
in a stand-alone environment. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@291717 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9ae22bf60e
commit
94ddffd863
|
@ -0,0 +1,24 @@
|
|||
import org.apache.maven.embedder.*;
|
||||
|
||||
public class Plugin
|
||||
{
|
||||
public Plugin()
|
||||
throws Exception
|
||||
{
|
||||
MavenEmbedder maven = new MavenEmbedder();
|
||||
|
||||
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
|
||||
|
||||
maven.setClassLoader( classLoader );
|
||||
|
||||
maven.start();
|
||||
|
||||
System.out.println( "Happy happy joy joy!" );
|
||||
}
|
||||
|
||||
public static void main( String[] args )
|
||||
throws Exception
|
||||
{
|
||||
Plugin plugin = new Plugin();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
m2 clean:clean assembly:assembly
|
||||
|
||||
CLASSPATH=target/maven-embedder-2.0-beta-2-SNAPSHOT-dep.jar
|
||||
|
||||
javac -classpath $CLASSPATH Plugin.java
|
||||
|
||||
java -classpath $CLASSPATH:. Plugin
|
Loading…
Reference in New Issue