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:
Jason van Zyl 2005-09-26 19:21:34 +00:00
parent 9ae22bf60e
commit 94ddffd863
2 changed files with 33 additions and 0 deletions

View File

@ -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();
}
}

9
maven-embedder/run.sh Executable file
View File

@ -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