Package org.codehaus.plexus.classworlds.strategy

Examples of org.codehaus.plexus.classworlds.strategy.Strategy


    }
   
    public void testClassworldSeftFirstStrategy() throws Exception {
      ClassWorld w = new ClassWorld("zero", null);
      ClassRealm rMojo = w.newRealm("mojo", getClass().getClassLoader());
      Strategy s = new SelfFirstStrategy(w.newRealm("scalaScript", null));
      ClassRealm rScript = s.getRealm();
      rScript.setParentClassLoader(getClass().getClassLoader());
      rScript.importFrom("mojo", MavenProject.class.getPackage().getName());
      rScript.importFrom("mojo", MavenSession.class.getPackage().getName());
      rScript.importFrom("mojo", Log.class.getPackage().getName());       
View Full Code Here


    }

    private URLClassLoader createScriptClassloader(File scriptDir, Set<String> classpath) throws Exception {
        ClassWorld w = new ClassWorld("zero", null);
        w.newRealm("mojo", getClass().getClassLoader());
        Strategy s = new SelfFirstStrategy(w.newRealm("scalaScript", null));
        ClassRealm rScript = s.getRealm();
        rScript.setParentClassLoader(getClass().getClassLoader());
        //rScript.importFrom("mojo", MavenProject.class.getPackage().getName());
        //rScript.importFrom("mojo", MavenSession.class.getPackage().getName());
        //rScript.importFrom("mojo", Log.class.getPackage().getName());
        rScript.importFrom("mojo", "org.apache.maven");
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.classworlds.strategy.Strategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.