Package org.codehaus.plexus.classworlds.realm

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


                logger.debug( "  Included: " + id );
            }

            try
            {
                classRealm.addURL( file.toURI().toURL() );
            }
            catch ( MalformedURLException e )
            {
                // Not going to happen
            }
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

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

                    logger.debug( "  Included " + file );

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

                extRealm.setParentRealm( coreRealm );

                containerRealm = extRealm;
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

        try {
            if (includeProjectClasspath) {
                // Thread context class loader is the ClassRealm for this plugin.
                ClassRealm c = (ClassRealm) Thread.currentThread().getContextClassLoader();
                // Add Project output directory to class path.
                c.addURL(new File(project.getBuild().getOutputDirectory()).toURI().toURL());
                // Add Project class path to class path.
                for (URL url : buildClassPath()) {
                    c.addURL(url);
                }
            }
View Full Code Here

                ClassRealm c = (ClassRealm) Thread.currentThread().getContextClassLoader();
                // Add Project output directory to class path.
                c.addURL(new File(project.getBuild().getOutputDirectory()).toURI().toURL());
                // Add Project class path to class path.
                for (URL url : buildClassPath()) {
                    c.addURL(url);
                }
            }

            StaticWeaveProcessor weave = new StaticWeaveProcessor(source, target);
            URL[] urls = buildClassPath();
View Full Code Here

            realm = world.newRealm("maven.plugin." + getClass().getSimpleName(), Thread
                    .currentThread().getContextClassLoader());
        }
        File cls = new File(buildDir + File.separator + DEFAULT_CLASSES_DIRECTORY);
        File testCls = new File(buildDir + File.separator + DEFAULT_TEST_CLASSES_DIRECTORY);
        realm.addURL(cls.toURI().toURL());
        realm.addURL(testCls.toURI().toURL());
        Thread.currentThread().setContextClassLoader(realm);
    }

    protected void waitForShutdown() {
View Full Code Here

                    .currentThread().getContextClassLoader());
        }
        File cls = new File(buildDir + File.separator + DEFAULT_CLASSES_DIRECTORY);
        File testCls = new File(buildDir + File.separator + DEFAULT_TEST_CLASSES_DIRECTORY);
        realm.addURL(cls.toURI().toURL());
        realm.addURL(testCls.toURI().toURL());
        Thread.currentThread().setContextClassLoader(realm);
    }

    protected void waitForShutdown() {
        final boolean[] shutdown = new boolean[] { false };
View Full Code Here

        return false;
      }
      // we create new realm to be able to return it by key without conversion to baseKey
      base.createChildRealm(plugin.getKey());
      for (File file : plugin.getDeployedFiles()) {
        base.addURL(file.toURI().toURL());
      }
      return true;
    } catch (UnsupportedClassVersionError e) {
      throw new SonarException(String.format("The plugin %s is not supported with Java %s",
        plugin.getKey(), SystemUtils.JAVA_VERSION_TRIMMED), e);
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.