Package org.codehaus.plexus.classworlds.realm

Examples of org.codehaus.plexus.classworlds.realm.ClassRealm.addURL()


    try {
      List<URL> urls = getApplicationClasspath();
      // Inject classloader into Maven's classworlds
      ClassRealm r = ((ClassRealm)this.getClass().getClassLoader());
      for (URL url : urls) {
        r.addURL(url);
      }
    } catch (Exception e) {
      throw new MojoExecutionException("Could not prepare class loader.", e);
    }
  }
View Full Code Here


    ClassRealm realm = world.newRealm("it-boot", null);
    log.info("Boot classpath:");
    for (URL url : classpath) {
      log.info("  {}", url);
      realm.addURL(url);
    }

    return realm;
  }
View Full Code Here

                if(verbose) {
                    getLog().info(element);
                } else {
                    getLog().debug(element);
                }
                realm.addURL(elementFile.toURI().toURL());
            }
        } catch (DependencyResolutionRequiredException e) {
            getLog().warn(e);
        } catch (MalformedURLException e) {
            getLog().warn(e);
View Full Code Here

                {
                    File file = resolveFile( new File( jar ), cliRequest.workingDirectory );

                    slf4jLogger.debug( "  Included " + file );

                    extRealm.addURL( file.toURI().toURL() );
                }

                extRealm.setParentRealm( coreRealm );

                containerRealm = extRealm;
View Full Code Here

                {
                    File file = new File( constituent );

                    if ( file.exists() )
                    {
                        curRealm.addURL( file.toURL() );
                    }
                    else
                    {
                        try
                        {
View Full Code Here

                    }
                    else
                    {
                        try
                        {
                            curRealm.addURL( new URL( constituent ) );
                        }
                        catch ( MalformedURLException e )
                        {
                            throw new FileNotFoundException( constituent );
                        }
View Full Code Here

                {
                    File file = new File( constituent );

                    if ( file.exists() )
                    {
                        curRealm.addURL( file.toURL() );
                    }
                    else
                    {
                        try
                        {
View Full Code Here

                    }
                    else
                    {
                        try
                        {
                            curRealm.addURL( new URL( constituent ) );
                        }
                        catch ( MalformedURLException e )
                        {
                            // swallow
                        }
View Full Code Here

                            logger.debug( "  Included: " + artifact.getId() );
                        }

                        try
                        {
                            extensionRealm.addURL( artifact.getFile().toURI().toURL() );
                        }
                        catch ( MalformedURLException e )
                        {
                            // Not going to happen
                        }
View Full Code Here

                exposedPluginArtifacts.add( artifact );

                try
                {
                    pluginRealm.addURL( artifact.getFile().toURI().toURL() );
                }
                catch ( MalformedURLException e )
                {
                    // Not going to happen
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.