Package org.apache.maven.reporting

Examples of org.apache.maven.reporting.MavenReport


        List<MavenReportExecution> filtered = new ArrayList<MavenReportExecution>( reports );

        Map<String, MavenReport> reportsByOutputName = new LinkedHashMap<String, MavenReport>();
        for ( MavenReportExecution mavenReportExecution : filtered )
        {
            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


        {
            MenuItem item = i.next();

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

                if ( report != null )
                {
                    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

            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

                {
                    final MojoDescriptor mojoDescriptor = (MojoDescriptor) it2.next();
   
                    if ( goals.isEmpty() || ( !goals.isEmpty() && goals.contains( mojoDescriptor.getGoal() ) ) )
                    {
                        MavenReport report = getMavenReport( mojoDescriptor );
   
                        generateMavenReport( mojoDescriptor, report, locale );
                    }
                }
            }
View Full Code Here

            return;
        }

        for ( final Iterator it = getGeneratedMavenReports( locale ).iterator(); it.hasNext(); )
        {
            MavenReport generatedReport = (MavenReport) it.next();

            if ( report.getName( locale ).equals( generatedReport.getName( locale ) ) )
            {
                if ( getLog().isDebugEnabled() )
                {
                    getLog().debug( report.getName( locale ) + " was already generated." );
                }
View Full Code Here

        List items = new ArrayList( 4 );

        // append generated report defined as MavenReport
        for ( final Iterator it = getGeneratedMavenReports( locale ).iterator(); it.hasNext(); )
        {
            final MavenReport report = (MavenReport) it.next();

            final DocumentTOCItem reportItem = new DocumentTOCItem();
            reportItem.setName( report.getName( locale ) );
            reportItem.setRef( "/" + report.getOutputName() );

            items.add( reportItem );

            addedRef.add( report.getOutputName() );
        }

        // append all generated reports from generated-site
        try
        {
View Full Code Here

            {
                final MojoDescriptor mojoDescriptor = (MojoDescriptor) it2.next();

                if ( goals.isEmpty() || ( !goals.isEmpty() && goals.contains( mojoDescriptor.getGoal() ) ) )
                {
                    MavenReport report = getMavenReport( mojoDescriptor );

                    generateMavenReport( mojoDescriptor, report, locale );
                }
            }
        }
View Full Code Here

            return;
        }

        for ( final Iterator it = getGeneratedMavenReports( locale ).iterator(); it.hasNext(); )
        {
            MavenReport generatedReport = (MavenReport) it.next();

            if ( report.getName( locale ).equals( generatedReport.getName( locale ) ) )
            {
                if ( getLog().isDebugEnabled() )
                {
                    getLog().debug( report.getName( locale ) + " was already generated." );
                }
View Full Code Here

        List items = new ArrayList();

        // append generated report defined as MavenReport
        for ( final Iterator it = getGeneratedMavenReports( locale ).iterator(); it.hasNext(); )
        {
            final MavenReport report = (MavenReport) it.next();

            final DocumentTOCItem reportItem = new DocumentTOCItem();
            reportItem.setName( report.getName( locale ) );
            reportItem.setRef( "/" + report.getOutputName() );

            items.add( reportItem );

            addedRef.add( report.getOutputName() );
        }

        // append all generated reports from generated-site
        try
        {
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.