9596979899100101102103104105
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); } }
167168169170171172173174175176177
ClassRealm realm = world.newRealm("it-boot", null); log.info("Boot classpath:"); for (URL url : classpath) { log.info(" {}", url); realm.addURL(url); } return realm; }
180181182183184185186187188189190
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);
474475476477478479480481482483484
{ File file = resolveFile( new File( jar ), cliRequest.workingDirectory ); slf4jLogger.debug( " Included " + file ); extRealm.addURL( file.toURI().toURL() ); } extRealm.setParentRealm( coreRealm ); containerRealm = extRealm;
318319320321322323324325326327328
{ File file = new File( constituent ); if ( file.exists() ) { curRealm.addURL( file.toURL() ); } else { try {
324325326327328329330331332333334
} else { try { curRealm.addURL( new URL( constituent ) ); } catch ( MalformedURLException e ) { throw new FileNotFoundException( constituent ); }
349350351352353354355356357358359
355356357358359360361362363364365
} else { try { curRealm.addURL( new URL( constituent ) ); } catch ( MalformedURLException e ) { // swallow }
245246247248249250251252253254255
logger.debug( " Included: " + artifact.getId() ); } try { extensionRealm.addURL( artifact.getFile().toURI().toURL() ); } catch ( MalformedURLException e ) { // Not going to happen }
379380381382383384385386387388389
exposedPluginArtifacts.add( artifact ); try { pluginRealm.addURL( artifact.getFile().toURI().toURL() ); } catch ( MalformedURLException e ) { // Not going to happen }