Examples of MavenReport


Examples of org.apache.maven.reporting.MavenReport

            mojoExecution.setConfiguration( mergeConfiguration( mojoDescriptor.getMojoConfiguration(),
                                                                reportPlugin.getConfiguration(),
                                                                report.getConfiguration(),
                                                                mojoDescriptor.getParameterMap().keySet() ) );

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

            MavenReportExecution mavenReportExecution =
                new MavenReportExecution( mojoExecution.getPlugin(), mavenReport, pluginDescriptor.getClassRealm() );
View Full Code Here

Examples of org.apache.maven.reporting.MavenReport

        if ( mojoExecution.getConfiguration() != null )
        {
            dom = Xpp3Dom.mergeXpp3Dom( dom, mojoExecution.getConfiguration() );
        }

        MavenReport report = (MavenReport) getConfiguredMojo( session, dom, project, true, mojoExecution );
       
        return report;
    }
View Full Code Here

Examples of org.apache.maven.reporting.MavenReport

        if ( cacheFile != null )
        {
            assertTrue( "Test cache file exists", new File( cacheFile ).exists() );
        }

        MavenReport reportMojo = mojo;
        File outputDir = reportMojo.getReportOutputDirectory();

        Boolean rss = (Boolean) getVariableValueFromObject( mojo, "enableRSS" );
        if (rss)
        {
            File rssFile = new File( outputDir, "checkstyle.rss" );
            assertTrue( "Test rss file exists", rssFile.exists() );
        }

        File useFile = (File) getVariableValueFromObject( mojo, "useFile" );
        if ( useFile != null )
        {
            assertTrue( "Test useFile exists", useFile.exists() );
        }

        String filename = reportMojo.getOutputName() + ".html";
        File outputHtml = new File( outputDir, filename );

        renderer( mojo, outputHtml );

        assertTrue( outputHtml.getAbsolutePath() + " not generated!", outputHtml.exists() );
View Full Code Here

Examples of org.apache.maven.reporting.MavenReport

            MojoExecution reportExecution = (MojoExecution) it.next();
            PluginDescriptor pluginDescriptor = reportExecution.getMojoDescriptor().getPluginDescriptor();
           
            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

Examples of org.apache.maven.reporting.MavenReport

    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;
    }
View Full Code Here

Examples of org.apache.maven.reporting.MavenReport

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

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

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

Examples of org.apache.maven.reporting.MavenReport

                                                  MavenReportExecutorRequest mavenReportExecutorRequest )
        throws PluginContainerException, PluginConfigurationException

    {

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

Examples of org.apache.maven.reporting.MavenReport

        File outputDir = getOutputDirectory( locale );

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

        siteRenderer.render( documents.values(), context, outputDir );

        if ( generateSitemap )
View Full Code Here

Examples of org.apache.maven.reporting.MavenReport

    {
        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

Examples of org.apache.maven.reporting.MavenReport

        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
TOP
Copyright © 2018 www.massapi.com. 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.