reportsDir = mojo.getConfigurationValue("reportsDirectory", File.class); } catch (ComponentConfigurationException e) { e.printStackTrace(listener.fatalError(Messages.SurefireArchiver_NoReportsDir())); build.setResult(Result.FAILURE); return true;
fileSet = testMojo.getReportFiles(pom, mojo); } catch (ComponentConfigurationException e) { e.printStackTrace(listener.fatalError(Messages.SurefireArchiver_NoReportsDir())); build.setResult(Result.FAILURE); return true;
public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) throws InterruptedException, IOException { if(!mojo.is("org.apache.maven.plugins","maven-site-plugin","site")) return true; if(build.isSiteArchivingDisabled()) { listener.getLogger().println("[JENKINS] Archiving disabled - not archiving site for " + pom.getName()); return true; } File destDir; try { destDir = mojo.getConfigurationValue("outputDirectory", File.class); } catch (ComponentConfigurationException e) { e.printStackTrace(listener.fatalError("Unable to find the site output directory")); build.setResult(Result.FAILURE); return true; } if(destDir != null && destDir.exists()) { // try to get the storage location if this is a multi-module project. final FilePath target = getModulePath(build, pom); try { listener.getLogger().printf("[JENKINS] Archiving site from %s to %s%n", destDir, target); new FilePath(destDir).copyRecursiveTo(target); } catch (IOException e) { Util.displayIOException(e,listener); e.printStackTrace(listener.fatalError("Unable to copy site from %s to %s",destDir,target)); build.setResult(Result.FAILURE); } build.registerAsAggregatedProjectAction(this); } return true; }
e.printStackTrace(listener.fatalError("Unable to obtain configuration from cobertura mojo")); build.setResult(Result.UNSTABLE); return true;
public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) throws InterruptedException, IOException { if(!mojo.is("org.apache.maven.plugins","maven-site-plugin","site")) return true; File destDir; try { destDir = mojo.getConfigurationValue("outputDirectory", File.class); } catch (ComponentConfigurationException e) { e.printStackTrace(listener.fatalError("Unable to find the site output directory")); build.setResult(Result.FAILURE); return true; } if(destDir.exists()) { // try to get the storage location if this is a multi-module project. final String moduleName = getModuleName(build, pom); // store at MavenModuleSet level and moduleName final FilePath target = build.getModuleSetRootDir().child("site").child(moduleName); try { listener.getLogger().printf("[HUDSON] Archiving site from %s to %s\n", destDir, target); new FilePath(destDir).copyRecursiveTo("**/*",target); } catch (IOException e) { Util.displayIOException(e,listener); e.printStackTrace(listener.fatalError("Unable to copy site from %s to %s",destDir,target)); build.setResult(Result.FAILURE); } build.registerAsAggregatedProjectAction(this); } return true; }
destDir = mojo.getConfigurationValue("outputDirectory", File.class); } catch (ComponentConfigurationException e) { e.printStackTrace(listener.fatalError(Messages.MavenJavadocArchiver_NoDestDir())); build.setResult(Result.FAILURE); return true;
destDir = mojo.getConfigurationValue("outputDirectory", File.class); } catch (ComponentConfigurationException e) { e.printStackTrace(listener.fatalError(Messages.MavenJavadocArchiver_NoDestDir())); build.setResult(Result.FAILURE); return true;