Package org.apache.maven.model

Examples of org.apache.maven.model.ReportPlugin


        if ( reports != null )
        {
            for ( Iterator i = reports.iterator(); i.hasNext(); )
            {
                ReportPlugin p = (ReportPlugin) i.next();

                String version;
                if ( StringUtils.isEmpty( p.getVersion() ) )
                {
                    version = "RELEASE";
                }
                else
                {
                    version = p.getVersion();
                }

                Artifact artifact;
                try
                {
                    artifact = artifactFactory.createPluginArtifact( p.getGroupId(), p.getArtifactId(),
                                                                     VersionRange.createFromVersionSpec( version ) );
                }
                catch ( InvalidVersionSpecificationException e )
                {
                    throw new ProjectBuildingException( projectId, "Unable to parse version '" + version +
                        "' for report '" + ArtifactUtils.versionlessKey( p.getGroupId(), p.getArtifactId() ) + "': " +
                        e.getMessage(), e );
                }

                if ( artifact != null )
                {
View Full Code Here


    {
        Model parent = makeBaseModel( "parent" );

        Model child = makeBaseModel( "child" );

        ReportPlugin parentReport = new ReportPlugin();
        parentReport.setArtifactId( "maven-testInheritance-report-plugin" );
        parentReport.setGroupId( "org.apache.maven.plugins" );
        parentReport.setVersion( "1.0" );

        List parentPlugins = Collections.singletonList( parentReport );

        Reporting parentBuild = new Reporting();
        parentBuild.setPlugins( parentPlugins );
View Full Code Here

    {
        Model parent = makeBaseModel( "parent" );

        Model child = makeBaseModel( "child" );

        ReportPlugin parentPlugin = new ReportPlugin();
        parentPlugin.setArtifactId( "maven-testInheritance2-report-plugin" );
        parentPlugin.setGroupId( "org.apache.maven.plugins" );
        parentPlugin.setVersion( "1.0" );
        parentPlugin.setInherited( "true" );

        List parentPlugins = Collections.singletonList( parentPlugin );

        Reporting parentBuild = new Reporting();
        parentBuild.setPlugins( parentPlugins );
View Full Code Here

    {
        Model parent = makeBaseModel( "parent" );

        Model child = makeBaseModel( "child" );

        ReportPlugin parentPlugin = new ReportPlugin();
        parentPlugin.setArtifactId( "maven-testInheritance3-report-plugin" );
        parentPlugin.setGroupId( "org.apache.maven.plugins" );
        parentPlugin.setVersion( "1.0" );
        parentPlugin.setInherited( "false" );

        List parentPlugins = Collections.singletonList( parentPlugin );

        Reporting parentBuild = new Reporting();
        parentBuild.setPlugins( parentPlugins );
View Full Code Here

            {
                assertEquals( expectedPlugins.size(), childPluginsMap.size() );

                for ( Iterator it = expectedPlugins.iterator(); it.hasNext(); )
                {
                    ReportPlugin expectedPlugin = (ReportPlugin) it.next();

                    ReportPlugin childPlugin = (ReportPlugin) childPluginsMap.get( expectedPlugin.getKey() );

                    assertReportsEqual( expectedPlugin, childPlugin );
                }
            }
            else
View Full Code Here

                if ( modelReportPlugins != null )
                {
                    for ( Iterator it = modelReportPlugins.iterator(); it.hasNext(); )
                    {
                        ReportPlugin modelReportPlugin = (ReportPlugin) it.next();

                        String inherited = modelReportPlugin.getInherited();

                        if ( StringUtils.isEmpty( inherited ) || Boolean.valueOf( inherited ).booleanValue() )
                        {
                            ReportPlugin profileReportPlugin = (ReportPlugin) profileReportersByKey
                                .get( modelReportPlugin.getKey() );

                            ReportPlugin mergedReportPlugin = modelReportPlugin;

                            if ( profileReportPlugin != null )
                            {
                                mergedReportPlugin = profileReportPlugin;

                                mergeReportPlugins( profileReportPlugin, modelReportPlugin );
                            }
                            else if ( StringUtils.isEmpty( inherited ) )
                            {
                                mergedReportPlugin.unsetInheritanceApplied();
                            }

                            mergedReportPlugins.put( mergedReportPlugin.getKey(), mergedReportPlugin );
                        }
                    }
                }

                for ( Iterator it = profileReportersByKey.entrySet().iterator(); it.hasNext(); )
View Full Code Here

            }

            Counter innerCount = new Counter( counter.getDepth() + 1 );
            while ( it.hasNext() )
            {
                ReportPlugin value = (ReportPlugin) it.next();
                Element el;
                if ( ( elIt != null ) && elIt.hasNext() )
                {
                    el = (Element) elIt.next();
                    if ( !elIt.hasNext() )
View Full Code Here

        List<ReportPlugin> reports = getReportPlugins();
        if ( reports != null )
        {
            for ( Iterator<ReportPlugin> i = reports.iterator(); i.hasNext(); )
            {
                ReportPlugin p = (ReportPlugin) i.next();

                String version;
                if ( StringUtils.isEmpty( p.getVersion() ) )
                {
                    version = "RELEASE";
                }
                else
                {
                    version = p.getVersion();
                }

                Plugin pp = new Plugin();
                pp.setGroupId( p.getGroupId() );
                pp.setArtifactId( p.getArtifactId() );
                pp.setVersion( version );
                Artifact artifact = repositorySystem.createPluginArtifact( pp );

                if ( artifact != null )
                {
View Full Code Here

        if ( getReportPlugins() != null )
        {
            for ( Iterator<ReportPlugin> iterator = getReportPlugins().iterator(); iterator.hasNext(); )
            {
                ReportPlugin plugin = iterator.next();

                if ( pluginGroupId.equals( plugin.getGroupId() ) && pluginArtifactId.equals( plugin.getArtifactId() ) )
                {
                    dom = (Xpp3Dom) plugin.getConfiguration();

                    if ( reportSetId != null )
                    {
                        ReportSet reportSet = plugin.getReportSetsAsMap().get( reportSetId );
                        if ( reportSet != null )
                        {
                            Xpp3Dom executionConfiguration = (Xpp3Dom) reportSet.getConfiguration();
                            if ( executionConfiguration != null )
                            {
View Full Code Here

                }

                for ( ReportPlugin element : src )
                {
                    Object key = getReportPluginKey( element );
                    ReportPlugin existing = merged.get( key );
                    if ( existing == null )
                    {
                        merged.put( key, element );
                    }
                    else
View Full Code Here

TOP

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

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.