private void callSetListenerWithReflectOnInterceptorsQuietly( PluginManagerListener pluginManagerListener, ClassLoader cl ) { try { callSetListenerWithReflectOnInterceptors(pluginManagerListener, cl); } catch ( SecurityException | IllegalArgumentException | ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e ) { throw new RuntimeException( e.getMessage(), e ); } }
private void fireLeaveModule() throws InterruptedException, IOException { if(lastModule!=null) { listener.postModule(lastModule); lastModule = null; } } }
public void preBuild(MavenSession session, ReactorManager rm, EventDispatcher dispatcher) throws BuildFailureException, LifecycleExecutionException, IOException, InterruptedException { long startTime = System.nanoTime(); listener.preBuild(session, rm, dispatcher); overheadTime += System.nanoTime()-startTime; }
initializeAsynchronousExecutions(); Adapter a = new Adapter(this); callSetListenerWithReflectOnInterceptors( a, mavenJailProcessClassLoader ); registerSystemProperties(); listener.getLogger().println(formatArgs(goals)); int r = Main.launch(goals.toArray(new String[goals.size()])); Result waitForAsyncExecutionsResult = waitForAsynchronousExecutions(); if (waitForAsyncExecutionsResult != null) { return waitForAsyncExecutionsResult; NumberFormat n = NumberFormat.getInstance(); PrintStream logger = listener.getLogger(); logger.println("Total overhead was "+format(n,a.overheadTime)+"ms"); Channel ch = Channel.current(); logger.println("Class loading " +format(n,ch.classLoadingTime.get()) +"ms, "+ch.classLoadingCount+" classes"); logger.println("Resource loading "+format(n,ch.resourceLoadingTime.get())+"ms, "+ch.resourceLoadingCount+" times"); callSetListenerWithReflectOnInterceptorsQuietly( null, mavenJailProcessClassLoader );
callSetListenerWithReflectOnInterceptors( a, mavenJailProcessClassLoader ); listener.getLogger().println(formatArgs(goals)); int r = Main.launch(goals.toArray(new String[goals.size()])); NumberFormat n = NumberFormat.getInstance(); PrintStream logger = listener.getLogger(); logger.println("Total overhead was "+format(n,a.overheadTime)+"ms"); Channel ch = Channel.current(); logger.println("Class loading " +format(n,ch.classLoadingTime.get()) +"ms, "+ch.classLoadingCount+" classes"); logger.println("Resource loading "+format(n,ch.resourceLoadingTime.get())+"ms, "+ch.resourceLoadingCount+" times"); callSetListenerWithReflectOnInterceptorsQuietly( null, mavenJailProcessClassLoader );
public void postExecute(MavenProject project, MojoExecution exec, Mojo mojo, PlexusConfiguration mergedConfig, ExpressionEvaluator eval, Exception exception) throws IOException, InterruptedException { long startTime = System.nanoTime(); listener.postExecute(project, new MojoInfo(exec, mojo, mergedConfig, eval, getMojoStartTime(project)),exception); if(listener.hasBuildFailures()) hasTestFailures.compareAndSet(false, true); overheadTime += System.nanoTime()-startTime; }
public void postBuild(MavenSession session, ReactorManager rm, EventDispatcher dispatcher) throws BuildFailureException, LifecycleExecutionException, IOException, InterruptedException { long startTime = System.nanoTime(); fireLeaveModule(); listener.postBuild(session, rm, dispatcher); overheadTime += System.nanoTime()-startTime; }
@Override public Result call() throws IOException { try { if (debug) { listener.getLogger().println("Builder extends MavenBuilder in call " + Thread.currentThread().getContextClassLoader()); } return super.call(); } finally { if(lastProxy!=null) lastProxy.appendLastLog(); } }
public void onReportGenerated(MavenReport report, MojoExecution mojoExecution, PlexusConfiguration mergedConfig, ExpressionEvaluator eval) throws IOException, InterruptedException { long startTime = System.nanoTime(); listener.onReportGenerated(lastModule,new MavenReportInfo(mojoExecution,report,mergedConfig,eval)); overheadTime += System.nanoTime()-startTime; }
public void postExecute(MavenProject project, MojoExecution exec, Mojo mojo, PlexusConfiguration mergedConfig, ExpressionEvaluator eval, Exception exception) throws IOException, InterruptedException { long startTime = System.nanoTime(); listener.postExecute(project, new MojoInfo(exec, mojo, mergedConfig, eval),exception); overheadTime += System.nanoTime()-startTime; }
public void postBuild(MavenSession session, ReactorManager rm, EventDispatcher dispatcher) throws BuildFailureException, LifecycleExecutionException, IOException, InterruptedException { long startTime = System.nanoTime(); // If postModule wasn't executed before this method, the build has failed. if (lastModule != null) { ModuleName name = new ModuleName(lastModule); MavenBuildProxy2 proxy = listener.proxies.get(name); proxy.setResult(Result.FAILURE); } fireLeaveModule(); listener.postBuild(session, rm, dispatcher); overheadTime += System.nanoTime()-startTime; }
@Override public Result call() throws IOException { try { if (MavenModuleSetBuild.debug) { listener.getLogger().println("Builder extends MavenBuilder in call " + Thread.currentThread().getContextClassLoader()); } return super.call(); } finally { if(lastProxy!=null) lastProxy.appendLastLog(); } }
public void onReportGenerated(MavenReport report, MojoExecution mojoExecution, PlexusConfiguration mergedConfig, ExpressionEvaluator eval) throws IOException, InterruptedException { long startTime = System.nanoTime(); listener.onReportGenerated(lastModule,new MavenReportInfo(mojoExecution,report,mergedConfig,eval, getMojoStartTime(lastModule))); overheadTime += System.nanoTime()-startTime; }
private void fireLeaveModule() throws InterruptedException, IOException { if(lastModule!=null) { listener.postModule(lastModule); lastModule = null; } }
public void preBuild(MavenSession session, ReactorManager rm, EventDispatcher dispatcher) throws BuildFailureException, LifecycleExecutionException, IOException, InterruptedException { long startTime = System.nanoTime(); listener.preBuild(session, rm, dispatcher); overheadTime += System.nanoTime()-startTime; }
callSetListenerWithReflectOnInterceptors(pluginManagerListener, cl);