Examples of ReportPlugin


Examples of org.apache.maven.model.ReportPlugin

                }

                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

Examples of org.apache.maven.model.ReportPlugin

        Collection plugin = project.getReportPlugins();
        if ( plugin != null )
        {
            for ( Iterator iter = plugin.iterator(); iter.hasNext(); )
            {
                ReportPlugin reportPlugin = (ReportPlugin) iter.next();
                if ( "maven-javadoc-plugin".equals( reportPlugin.getArtifactId() ) )
                {
                    break;
                }
            }
        }
View Full Code Here

Examples of org.apache.maven.model.ReportPlugin

                    warnings.add(
                        "Non-standard report: \'" + reportName + "\'. Skipping this one." );
                }
                else
                {
                    ReportPlugin reportPlugin = new ReportPlugin();

                    reportPlugin.setGroupId( findReportPluginGroupId( reportName ) );

                    reportPlugin.setArtifactId( reportName );

                    StringBuffer info = new StringBuffer();

                    info.append( "Using some derived information for report: \'" ).append( reportName )
                        .append( "\'.\n" )
                        .append( "\to groupId: \'" ).append( reportPlugin.getGroupId() ).append( "\'\n" )
                        .append( "\to artifactId: \'" ).append( reportName ).append( "\'\n" )
                        .append( "\to goal: \'report\'\n" )
                        .append( "\n" )
                        .append( "These values were extracted using the v3 report naming convention," )
                        .append( " but may be wrong." );
View Full Code Here

Examples of org.apache.maven.model.ReportPlugin

        throws Exception
    {
        super.setUp();
        object3 = new Object();
        object4 = new Object();
        plugin1 = new ReportPlugin();
        plugin1.setGroupId( null );
        plugin1.setArtifactId( null );
        plugin2 = new ReportPlugin();
        plugin2.setGroupId( null );
        plugin2.setArtifactId( null );
        plugin3 = new ReportPlugin();
        plugin3.setGroupId( "a" );
        plugin3.setArtifactId( "d" );
        plugin4 = new ReportPlugin();
        plugin4.setGroupId( "a" );
        plugin4.setArtifactId( "d" );
        plugin5 = new ReportPlugin();
        plugin5.setGroupId( "a" );
        plugin5.setArtifactId( "c" );
        plugin6 = new ReportPlugin();
        plugin6.setGroupId( "a" );
        plugin6.setArtifactId( "e" );
        plugin7 = new ReportPlugin();
        plugin7.setGroupId( "b" );
        plugin7.setArtifactId( "b" );
        plugin8 = new ReportPlugin();
        plugin8.setGroupId( "b" );
        plugin8.setArtifactId( "e" );
        plugin9 = new ReportPlugin();
        plugin9.setGroupId( null );
        plugin9.setArtifactId( "e" );
        plugin10 = new ReportPlugin();
        plugin10.setGroupId( "a" );
        plugin10.setArtifactId( null );
        comparator = new ReportPluginComparator();
    }
View Full Code Here

Examples of org.apache.maven.model.ReportPlugin

        }
       
        Iterator iterator = model.getReporting().getPlugins().iterator();
        while ( iterator.hasNext() )
        {
            ReportPlugin plugin = (ReportPlugin) iterator.next();
            if ( plugin.getGroupId().equals( groupId ) && plugin.getArtifactId().equals( artifactId ) )
            {
                return plugin;
            }
        }
        return null;
View Full Code Here

Examples of org.apache.maven.model.ReportPlugin

                    fireAddPluginEvent( plugin );
                }
            }
            else if ( TYPE_REPORT_PLUGIN.equals( getType() ) )
            {
                ReportPlugin plugin = ModelUtils.findReportPlugin( v4Model, getGroupId(), getArtifactId() );
                if ( plugin == null )
                {
                    addPlugin = true;
                    plugin = new ReportPlugin();
                    plugin.setGroupId( getGroupId() );
                    plugin.setArtifactId( getArtifactId() );
                }

                plugin.setConfiguration( configuration );

                if ( getReportSets() != null && !getReportSets().isEmpty() )
                {
                    plugin.setReportSets( getReportSets() );
                }

                if ( addPlugin )
                {
                    if ( v4Model.getReporting() == null )
                    {
                        v4Model.setReporting( new Reporting() );
                    }
                    v4Model.getReporting().addPlugin( plugin );
                    sendInfoMessage( "Adding report " + plugin.getGroupId() + ":" + plugin.getArtifactId() );
                    fireAddReportEvent( plugin );
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.maven.model.ReportPlugin

        }
        if ( !( o2 instanceof ReportPlugin ) )
        {
            return 1;
        }
        ReportPlugin plugin1 = (ReportPlugin) o1;
        ReportPlugin plugin2 = (ReportPlugin) o2;

        // Check for null values
        if ( plugin1.getGroupId() == null && plugin2.getGroupId() == null )
        {
            return compareArtifactId( plugin1, plugin2 );
        }
        if ( plugin1.getGroupId() == null )
        {
            return -1;
        }
        if ( plugin2.getGroupId() == null )
        {
            return 1;
        }

        // Compare values
        int answer;
        answer = plugin1.getGroupId().compareTo( plugin2.getGroupId() );
        if ( answer == 0 )
        {
            answer = compareArtifactId( plugin1, plugin2 );
        }
View Full Code Here

Examples of org.apache.maven.model.ReportPlugin

                }
            }
        }

        // Relocate report plugins
        ReportPlugin oldReportPlugin = ModelUtils.findReportPlugin( v4Model, getOldGroupId(), getOldArtifactId() );
        if ( oldReportPlugin != null )
        {
            if ( getNewArtifactId() == null && getNewGroupId() == null )
            {
                // Remove the old plugin
                v4Model.getReporting().getPlugins().remove( oldReportPlugin );
                sendInfoMessage( "Removing report plugin " + getOldGroupId() + ":" + getOldArtifactId() );
                fireRemovePluginEvent( getOldGroupId(), getOldArtifactId() );
            }
            else
            {
                ReportPlugin newPlugin = ModelUtils.findReportPlugin( v4Model, getNewGroupId(), getNewArtifactId() );
                if ( newPlugin == null )
                {
                    // The new plugin does not exist, relocate the old one
                    oldReportPlugin.setArtifactId( getNewArtifactId() );
                    oldReportPlugin.setGroupId( getNewGroupId() );
View Full Code Here

Examples of org.apache.maven.model.ReportPlugin

     * @return ReportPlugin
     */
    private ReportPlugin parseReportPlugin( String tagName, XmlPullParser parser, boolean strict )
        throws IOException, XmlPullParserException
    {
        ReportPlugin reportPlugin = new ReportPlugin();
        java.util.Set parsed = new java.util.HashSet();
        while ( parser.nextTag() == XmlPullParser.START_TAG )
        {
            if ( checkFieldWithDuplicate( parser, "groupId", null, parsed ) )
            {
                reportPlugin.setGroupId( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "artifactId", null, parsed ) )
            {
                reportPlugin.setArtifactId( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "version", null, parsed ) )
            {
                reportPlugin.setVersion( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "inherited", null, parsed ) )
            {
                reportPlugin.setInherited( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "configuration", null, parsed ) )
            {
                reportPlugin.setConfiguration( Xpp3DomBuilder.build( parser ) );
            }
            else if ( checkFieldWithDuplicate( parser, "reportSets", null, parsed ) )
            {
                java.util.List reportSets = new java.util.ArrayList/*<ReportSet>*/();
                reportPlugin.setReportSets( reportSets );
                while ( parser.nextTag() == XmlPullParser.START_TAG )
                {
                    if ( parser.getName().equals( "reportSet" ) )
                    {
                        reportSets.add( parseReportSet( "reportSet", parser, strict ) );
View Full Code Here

Examples of org.apache.maven.model.ReportPlugin

            if ( ( reporting.getPlugins() != null ) && ( reporting.getPlugins().size() > 0 ) )
            {
                serializer.startTag( NAMESPACE, "plugins" );
                for ( Iterator iter = reporting.getPlugins().iterator(); iter.hasNext(); )
                {
                    ReportPlugin o = (ReportPlugin) iter.next();
                    writeReportPlugin( o, "plugin", serializer );
                }
                serializer.endTag( NAMESPACE, "plugins" );
            }
            serializer.endTag( NAMESPACE, tagName );
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.