public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) throws InterruptedException, IOException { if(!(mojo.mojo instanceof MavenReport)) return true; // not a maven report MavenReport report = (MavenReport)mojo.mojo; String reportPath = report.getReportOutputDirectory().getPath(); String projectReportPath = pom.getReporting().getOutputDirectory(); if(!reportPath.startsWith(projectReportPath)) { // report is placed outside site. Can't record it. listener.getLogger().println(Messages.ReportCollector_OutsideSite(reportPath,projectReportPath)); return true; } if(action==null) action = new ReportAction(); // this is the entry point to the report File top = new File(report.getReportOutputDirectory(),report.getOutputName()+".html"); String relPath = top.getPath().substring(projectReportPath.length()); action.add(new ReportAction.Entry(relPath,report.getName(Locale.getDefault()))); return true; }
public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) throws InterruptedException, IOException { if(!(mojo.mojo instanceof MavenReport)) return true; // not a maven report MavenReport report = (MavenReport)mojo.mojo; String reportPath = report.getReportOutputDirectory().getPath(); String projectReportPath = pom.getReporting().getOutputDirectory(); if(!reportPath.startsWith(projectReportPath)) { // report is placed outside site. Can't record it. listener.getLogger().println(Messages.ReportCollector_OutsideSite(reportPath,projectReportPath)); return true; } if(action==null) action = new ReportAction(); // this is the entry point to the report File top = new File(report.getReportOutputDirectory(),report.getOutputName()+".html"); String relPath = top.getPath().substring(projectReportPath.length()); action.add(new ReportAction.Entry(relPath,report.getName(Locale.getDefault()))); return true; }
item.setName( report.getName( locale ) );
/** * @param name not null * @param href not null * @param categoryReports not null * @param locale not null * @return the menu item object */ private MenuItem createCategoryMenu( String name, String href, List<MavenReport> categoryReports, Locale locale ) { MenuItem item = new MenuItem(); item.setName( name ); item.setCollapse( true ); item.setHref( href ); // MSHARED-172, allow reports to define their order in some other way? //Collections.sort( categoryReports, new ReportComparator( locale ) ); for ( MavenReport report : categoryReports ) { MenuItem subitem = new MenuItem(); subitem.setName( report.getName( locale ) ); subitem.setHref( report.getOutputName() + ".html" ); item.getItems().add( subitem ); } return item; }
/** * @param name not null * @param href not null * @param categoryReports not null * @param locale not null * @return the menu item object */ private MenuItem createCategoryMenu( String name, String href, List<MavenReport> categoryReports, Locale locale ) { MenuItem item = new MenuItem(); item.setName( name ); item.setCollapse( true ); item.setHref( href ); // MSHARED-172, allow reports to define their order in some other way? //Collections.sort( categoryReports, new ReportComparator( locale ) ); for ( MavenReport report : categoryReports ) { MenuItem subitem = new MenuItem(); subitem.setName( report.getName( locale ) ); subitem.setHref( report.getOutputName() + ".html" ); item.getItems().add( subitem ); } return item; }
+ mavenReportExecution.getPlugin().getVersion() + ':' + mavenReportExecution.getGoal() + ')' ); getLog().info( "Skipped \"" + report.getName( locale ) + "\" report" + reportMojoInfo + ", file \"" + outputName + "\" already exists." );
String localReportName = report.getName( locale );
sink.tableCell(); sink.link( report.getOutputName() + ".html" ); sink.text( report.getName( locale ) ); sink.link_(); sink.tableCell_();