protected void mergeReporting_OutputDirectory( Reporting target, Reporting source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getOutputDirectory(); if ( src != null ) { if ( sourceDominant || target.getOutputDirectory() == null ) { target.setOutputDirectory( src ); target.setLocation( "outputDirectory", source.getLocation( "outputDirectory" ) ); } } }
if ( StringUtils.isEmpty( modelReporting.getOutputDirectory() ) ) modelReporting.setOutputDirectory( profileReporting.getOutputDirectory() );
private void assembleReportingInheritance( Model child, Model parent ) { // Reports :: aggregate Reporting childReporting = child.getReporting(); Reporting parentReporting = parent.getReporting(); if ( parentReporting != null ) { if ( childReporting == null ) { childReporting = new Reporting(); child.setReporting( childReporting ); } childReporting.setExcludeDefaults( parentReporting.isExcludeDefaults() ); if ( StringUtils.isEmpty( childReporting.getOutputDirectory() ) ) { childReporting.setOutputDirectory( parentReporting.getOutputDirectory() ); } mergeReportPluginLists( childReporting, parentReporting, true ); } }
private void assembleReportingInheritance( Model child, Model parent ) { // Reports :: aggregate Reporting childReporting = child.getReporting(); Reporting parentReporting = parent.getReporting(); if ( parentReporting != null ) { if ( childReporting == null ) { childReporting = new Reporting(); child.setReporting( childReporting ); } if ( childReporting.isExcludeDefaultsValue() == null ) { childReporting.setExcludeDefaultsValue( parentReporting.isExcludeDefaultsValue() ); } if ( StringUtils.isEmpty( childReporting.getOutputDirectory() ) ) { childReporting.setOutputDirectory( parentReporting.getOutputDirectory() ); } ModelUtils.mergeReportPluginLists( childReporting, parentReporting, true ); } }
public static Reporting cloneReporting( Reporting src ) { if ( src == null ) { return null; } Reporting result = new Reporting(); result.setExcludeDefaults( src.isExcludeDefaults() ); result.setOutputDirectory( src.getOutputDirectory() ); result.setPlugins( cloneList( src.getPlugins(), REPORT_PLUGIN_CLONER ) ); return result; }
if ( reporting.getOutputDirectory() != null ) serializer.startTag( NAMESPACE, "outputDirectory" ).text( reporting.getOutputDirectory() ).endTag( NAMESPACE, "outputDirectory" );
reporting.setOutputDirectory( alignToBaseDirectory( reporting.getOutputDirectory(), basedir ) );
reporting.setOutputDirectory( unalignFromBaseDirectory( reporting.getOutputDirectory(), basedir ) );
reporting.setOutputDirectory( alignToBaseDirectory( reporting.getOutputDirectory(), basedir ) );
reporting.setOutputDirectory( alignToBaseDirectory( reporting.getOutputDirectory(), basedir ) );
reporting.setOutputDirectory( unalignFromBaseDirectory( reporting.getOutputDirectory(), basedir ) );
addDom( configuration, "outputDirectory", reporting.getOutputDirectory() );
if ( reporting.getOutputDirectory() != null ) serializer.attribute( NAMESPACE, "outputDirectory", reporting.getOutputDirectory() );
public File getReportOutputDirectory() { if (reportOutputDirectory == null) { reportOutputDirectory = new File(project.getBasedir(), project.getReporting().getOutputDirectory() + "/" + outputDirectory).getAbsoluteFile(); } return reportOutputDirectory; }
/** * {@inheritDoc} */ @Override protected String getOutputDirectory() { // PLUGIN-191: output directory of plugin.html, not *-mojo.xml return project.getReporting().getOutputDirectory(); }
protected void mergeReporting_OutputDirectory( Reporting target, Reporting source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getOutputDirectory(); if ( src != null ) { if ( sourceDominant || target.getOutputDirectory() == null ) { target.setOutputDirectory( src ); target.setLocation( "outputDirectory", source.getLocation( "outputDirectory" ) ); } } }
@Override public File getReportOutputDir() { if (pom != null) { return resolvePath(pom.getReporting().getOutputDirectory()); } // emulate Maven report output dir return new File(getBuildDir(), "site"); }
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; }
/** * Method updateReporting * * @param value * @param element * @param counter * @param xmlTag */ protected void updateReporting(Reporting value, String xmlTag, Counter counter, Element element) { boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "excludeDefaults", value.isExcludeDefaults() == false ? null : String.valueOf( value.isExcludeDefaults() ), "false"); findAndReplaceSimpleElement(innerCount, root, "outputDirectory", value.getOutputDirectory(), null); iterateReportPlugin(innerCount, root, value.getPlugins(),"plugins","plugin"); } } //-- void updateReporting(Reporting, String, Counter, Element)
/** * Method updateReporting. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateReporting(Reporting value, String xmlTag, Counter counter, Element element) { boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "excludeDefaults", value.isExcludeDefaults() == false ? null : String.valueOf( value.isExcludeDefaults() ), "false"); findAndReplaceSimpleElement(innerCount, root, "outputDirectory", value.getOutputDirectory(), null); iterateReportPlugin(innerCount, root, value.getPlugins(),"plugins","plugin"); } } //-- void updateReporting(Reporting, String, Counter, Element)