Package org.apache.maven.reporting

Examples of org.apache.maven.reporting.MavenReport


            if ( generatedReports != null )
            {
                for ( final Iterator it = generatedReports.iterator(); it.hasNext(); )
                {
                    final MavenReport report = (MavenReport) it.next();

                    sink.tableRow();
                    sink.tableCell();
                    sink.link( report.getOutputName() + ".html" );
                    sink.text( report.getName( locale ) );
                    sink.link_();
                    sink.tableCell_();
                    sink.tableCell();
                    sink.text( report.getDescription( locale ) );
                    sink.tableCell_();
                    sink.tableRow_();
                }
            }
View Full Code Here


                   
                    mavenPluginManager.setupPluginRealm( pluginDescriptor,
                                                         mavenReportExecutorRequest.getMavenSession(),
                                                         Thread.currentThread().getContextClassLoader(), imports, exclusionSetFilter );

                    MavenReport mavenReport =
                        getConfiguredMavenReport( mojoExecution, pluginDescriptor, mavenReportExecutorRequest );

                    if ( mavenReport == null )
                    {
                        continue;
View Full Code Here

                                                  MavenReportExecutorRequest mavenReportExecutorRequest )
        throws PluginContainerException, PluginConfigurationException

    {

        MavenReport mavenReport = null;
        try
        {
            Mojo mojo = mavenPluginManager.getConfiguredMojo( Mojo.class,
                                                              mavenReportExecutorRequest.getMavenSession(),
                                                              mojoExecution );
View Full Code Here

    {
        List<MavenReportExecution> filteredReports = new ArrayList<MavenReportExecution>();
        for ( MavenReportExecution mavenReportExecution : reports )
        {
            // noinspection ErrorNotRethrown,UnusedCatchParameter
            MavenReport report = mavenReportExecution.getMavenReport();
            try
            {
                if ( report.canGenerateReport() )
                {
                    filteredReports.add( mavenReportExecution );
                }
            }
            catch ( AbstractMethodError e )
            {
                // the canGenerateReport() has been added just before the 2.0 release and will cause all the reporting
                // plugins with an earlier version to fail (most of the org.codehaus mojo now fails)
                // be nice with them, output a warning and don't let them break anything

                getLog().warn(
                               "Error loading report " + report.getClass().getName()
                                   + " - AbstractMethodError: canGenerateReport()" );
                filteredReports.add( mavenReportExecution );
            }
        }
        return filteredReports;
View Full Code Here

        Map<String, MavenReport> reportsByOutputName = new HashMap<String, MavenReport>();
        for ( Iterator<MavenReportExecution> iterator = filtered.iterator(); iterator.hasNext(); )
        {
            MavenReportExecution mavenReportExecution = iterator.next();
            MavenReport report = mavenReportExecution.getMavenReport();

            String outputName = report.getOutputName() + ".html";

            // Always add the report to the menu, see MSITE-150
            reportsByOutputName.put( report.getOutputName(), report );

            if ( documents.containsKey( outputName ) )
            {
                String displayLanguage = locale.getDisplayLanguage( Locale.ENGLISH );

                getLog().info( "Skipped \"" + report.getName( locale ) + "\" report, file \"" + outputName
                                   + "\" already exists for the " + displayLanguage + " version." );
                reports.remove( mavenReportExecution );
            }
            else
            {
View Full Code Here

    protected Map categoriseReports( Collection reports )
    {
        Map categories = new HashMap();
        for ( Iterator i = reports.iterator(); i.hasNext(); )
        {
            MavenReport report = (MavenReport) i.next();
            List categoryReports = (List) categories.get( report.getCategoryName() );
            if ( categoryReports == null )
            {
                categoryReports = new ArrayList();
                categories.put( report.getCategoryName(), categoryReports );
            }
            categoryReports.add( report );
        }
        return categories;
    }
View Full Code Here

            if ( item.getRef() != null )
            {
                if ( reportsByOutputName.containsKey( item.getRef() ) )
                {
                    MavenReport report = (MavenReport) reportsByOutputName.get( item.getRef() );

                    if ( item.getName() == null )
                    {
                        item.setName( report.getName( locale ) );
                    }

                    if ( item.getHref() == null || item.getHref().length() == 0 )
                    {
                        item.setHref( report.getOutputName() + ".html" );
                    }
                }
                else
                {
                    getLog().warn( "Unrecognised reference: '" + item.getRef() + "'" );
View Full Code Here

                MojoExecution reportExecution = new MojoExecution( mojoDescriptor, id );

                try
                {
                    MavenReport reportMojo = pluginManager.getReport( project, reportExecution, session );

                    // Comes back null if it was a plugin, not a report - these are mojos in the reporting plugins that are not reports
                    if ( reportMojo != null )
                    {
                        reports.add( reportMojo );
View Full Code Here

                MojoExecution reportExecution = new MojoExecution( mojoDescriptor, id );

                try
                {
                    MavenReport reportMojo = pluginManager.getReport( project, reportExecution, session );

                    // Comes back null if it was a plugin, not a report - these are mojos in the reporting plugins that are not reports
                    if ( reportMojo != null )
                    {
                        reports.add( reportMojo );
View Full Code Here

        // 2. then reports
        // For external reports
        for ( MavenReportExecution mavenReportExecution : reports )
        {
            MavenReport report = mavenReportExecution.getMavenReport();
            report.setReportOutputDirectory( outputDir );
        }

        siteRenderer.render( reportDocuments, context, outputDir );

        if ( generateSitemap )
View Full Code Here

TOP

Related Classes of org.apache.maven.reporting.MavenReport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.