Package org.apache.maven.model

Examples of org.apache.maven.model.Reporting


    }

    protected void mergeModelBase_Reporting( ModelBase target, ModelBase source, boolean sourceDominant,
                                             Map<Object, Object> context )
    {
        Reporting src = source.getReporting();
        if ( src != null )
        {
            Reporting tgt = target.getReporting();
            if ( tgt == null )
            {
                tgt = new Reporting();
                target.setReporting( tgt );
            }
            mergeReporting( tgt, src, sourceDominant, context );
        }
    }
View Full Code Here


                validateResources( problems, build.getResources(), "build.resources.resource", request );

                validateResources( problems, build.getTestResources(), "build.testResources.testResource", request );
            }

            Reporting reporting = model.getReporting();
            if ( reporting != null )
            {
                for ( ReportPlugin p : reporting.getPlugins() )
                {
                    validateStringNotEmpty( "reporting.plugins.plugin.artifactId", problems, Severity.ERROR,
                                            p.getArtifactId(), p );

                    validateStringNotEmpty( "reporting.plugins.plugin.groupId", problems, Severity.ERROR,
View Full Code Here

                                                           MavenProject project )
        throws ReleaseFailureException
    {
        List<ReportPlugin> releaseReportPlugins = null;

        Reporting reporting = project.getModel().getReporting();

        if ( reporting != null )
        {
            List<ReportPlugin> reportPlugins = reporting.getPlugins();

            if ( reportPlugins != null )
            {
                @SuppressWarnings( "unchecked" )
                Map<String, Artifact> artifactsById = project.getReportArtifactMap();
View Full Code Here

                                                           MavenProject project )
        throws ReleaseFailureException
    {
        List<ReportPlugin> releaseReportPlugins = null;

        Reporting reporting = project.getModel().getReporting();

        if ( reporting != null )
        {
            List<ReportPlugin> reportPlugins = reporting.getPlugins();

            if ( reportPlugins != null )
            {
                @SuppressWarnings( "unchecked" )
                Map<String, Artifact> artifactsById = project.getReportArtifactMap();
View Full Code Here

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

    }

    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() );
            }

            ModelUtils.mergeReportPluginLists( childReporting, parentReporting, true );
        }
    }
View Full Code Here

                validateStringNotEmpty( "build.testResources.testResource.directory", result, r.getDirectory() );
            }
        }

        Reporting reporting = model.getReporting();
        if ( reporting != null )
        {
            for ( Iterator it = reporting.getPlugins().iterator(); it.hasNext(); )
            {
                ReportPlugin p = (ReportPlugin) it.next();

                validateStringNotEmpty( "reporting.plugins.plugin.artifactId", result, p.getArtifactId() );
View Full Code Here

            build.setOutputDirectory( alignToBaseDirectory( build.getOutputDirectory(), basedir ) );

            build.setTestOutputDirectory( alignToBaseDirectory( build.getTestOutputDirectory(), basedir ) );

            Reporting reporting = model.getReporting();
            if ( reporting != null )
            {
                reporting.setOutputDirectory( alignToBaseDirectory( reporting.getOutputDirectory(), basedir ) );
            }
        }
    }
View Full Code Here

            build.setOutputDirectory( unalignFromBaseDirectory( build.getOutputDirectory(), basedir ) );

            build.setTestOutputDirectory( unalignFromBaseDirectory( build.getTestOutputDirectory(), basedir ) );

            Reporting reporting = model.getReporting();
            if ( reporting != null )
            {
                reporting.setOutputDirectory( unalignFromBaseDirectory( reporting.getOutputDirectory(), basedir ) );
            }
        }
    }
View Full Code Here

    {
        Model parent = makeBaseModel( "parent" );

        Model child = makeBaseModel( "child" );

        Reporting parentBuild = new Reporting();
        parentBuild.setExcludeDefaults( false );
        parent.setReporting( parentBuild );

        assembler.assembleModelInheritance( child, parent );

        assertFalse( "Check excludeDefaults is inherited", child.getReporting().isExcludeDefaults() );

        child = makeBaseModel( "child" );

        parentBuild.setExcludeDefaults( true );

        assembler.assembleModelInheritance( child, parent );

        assertTrue( "Check excludeDefaults is inherited", child.getReporting().isExcludeDefaults() );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.model.Reporting

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.