Package org.apache.maven.model

Examples of org.apache.maven.model.Contributor


        if ( src == null )
        {
            return null;
        }
       
        Contributor result = new Contributor();
        cloneContributorFields( src, result );
       
        return result;
    }
View Full Code Here


            }

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

            for ( Iterator it = v3Contributors.iterator(); it.hasNext(); )
            {
                org.apache.maven.model.v3_0_0.Contributor v3Contributor = (org.apache.maven.model.v3_0_0.Contributor) it
                    .next();

                Contributor contributor = new Contributor();

                contributor.setEmail( v3Contributor.getEmail() );
                contributor.setName( v3Contributor.getName() );
                contributor.setOrganization( v3Contributor.getOrganization() );
                contributor.setRoles( v3Contributor.getRoles() );
                contributor.setTimezone( v3Contributor.getTimezone() );
                contributor.setUrl( v3Contributor.getUrl() );

                contributors.add( contributor );
            }
        }
View Full Code Here

     * @return Contributor
     */
    private Contributor parseContributor( String tagName, XmlPullParser parser, boolean strict )
        throws IOException, XmlPullParserException
    {
        Contributor contributor = new Contributor();
        java.util.Set parsed = new java.util.HashSet();
        while ( parser.nextTag() == XmlPullParser.START_TAG )
        {
            if ( checkFieldWithDuplicate( parser, "name", null, parsed ) )
            {
                contributor.setName( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "email", null, parsed ) )
            {
                contributor.setEmail( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "url", null, parsed ) )
            {
                contributor.setUrl( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "organization", "organisation", parsed ) )
            {
                contributor.setOrganization( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "organizationUrl", "organisationUrl", parsed ) )
            {
                contributor.setOrganizationUrl( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "roles", null, parsed ) )
            {
                java.util.List roles = new java.util.ArrayList/*<String>*/();
                contributor.setRoles( roles );
                while ( parser.nextTag() == XmlPullParser.START_TAG )
                {
                    if ( parser.getName().equals( "role" ) )
                    {
                        roles.add( getTrimmedValue( parser.nextText() ) );
                    }
                    else if ( strict )
                    {
                        throw new XmlPullParserException( "Unrecognised association: '" + parser.getName() + "'", parser, null );
                    }
                    else
                    {
                        // swallow up to end tag since this is not valid
                        while ( parser.next() != XmlPullParser.END_TAG ) {}
                    }
                }
            }
            else if ( checkFieldWithDuplicate( parser, "timezone", null, parsed ) )
            {
                contributor.setTimezone( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "properties", null, parsed ) )
            {
                while ( parser.nextTag() == XmlPullParser.START_TAG )
                {
                    String key = parser.getName();
                    String value = parser.nextText().trim();
                    contributor.addProperty( key, value );
                }
            }
            else
            {
                if ( strict )
View Full Code Here

            if ( ( model.getContributors() != null ) && ( model.getContributors().size() > 0 ) )
            {
                serializer.startTag( NAMESPACE, "contributors" );
                for ( Iterator iter = model.getContributors().iterator(); iter.hasNext(); )
                {
                    Contributor o = (Contributor) iter.next();
                    writeContributor( o, "contributor", serializer );
                }
                serializer.endTag( NAMESPACE, "contributors" );
            }
            if ( model.getIssueManagement() != null )
View Full Code Here

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

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

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

        if ( src == null )
        {
            return null;
        }
       
        Contributor result = new Contributor();
        cloneContributorFields( src, result );
       
        return result;
    }
View Full Code Here

            if ( model.getContributors() != null && model.getContributors().size() > 0 )
            {
                serializer.startTag( NAMESPACE, "contributors" );
                for ( Iterator iter = model.getContributors().iterator(); iter.hasNext(); )
                {
                    Contributor o = (Contributor) iter.next();
                    writeContributor( o, "contributor", serializer );
                }
                serializer.endTag( NAMESPACE, "contributors" );
            }
            if ( model.getLicenses() != null && model.getLicenses().size() > 0 )
View Full Code Here

TOP

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

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.