Package org.apache.maven.model

Examples of org.apache.maven.model.Exclusion


     * @return Exclusion
     */
    private Exclusion parseExclusion( String tagName, XmlPullParser parser, boolean strict )
        throws IOException, XmlPullParserException
    {
        Exclusion exclusion = new Exclusion();
        java.util.Set parsed = new java.util.HashSet();
        while ( parser.nextTag() == XmlPullParser.START_TAG )
        {
            if ( checkFieldWithDuplicate( parser, "artifactId", null, parsed ) )
            {
                exclusion.setArtifactId( getTrimmedValue( parser.nextText() ) );
            }
            else if ( checkFieldWithDuplicate( parser, "groupId", null, parsed ) )
            {
                exclusion.setGroupId( getTrimmedValue( parser.nextText() ) );
            }
            else
            {
                if ( strict )
                {
View Full Code Here


                art.setFile(new File(dependency.getSystemPath()));
            }

            List exclusions = new ArrayList();
            for (Iterator j = dependency.getExclusions().iterator(); j.hasNext();) {
                Exclusion e = (Exclusion)j.next();
                exclusions.add(e.getGroupId() + ":" + e.getArtifactId());
            }

            ArtifactFilter newFilter = new ExcludesArtifactFilter(exclusions);

            art.setDependencyFilter(newFilter);
View Full Code Here

                art.setFile(new File(dependency.getSystemPath()));
            }

            List exclusions = new ArrayList();
            for (Iterator j = dependency.getExclusions().iterator(); j.hasNext();) {
                Exclusion e = (Exclusion)j.next();
                exclusions.add(e.getGroupId() + ":" + e.getArtifactId());
            }

            ArtifactFilter newFilter = new ExcludesArtifactFilter(exclusions);

            art.setDependencyFilter(newFilter);
View Full Code Here

            if ( ( dependency.getExclusions() != null ) && ( dependency.getExclusions().size() > 0 ) )
            {
                serializer.startTag( NAMESPACE, "exclusions" );
                for ( Iterator iter = dependency.getExclusions().iterator(); iter.hasNext(); )
                {
                    Exclusion o = (Exclusion) iter.next();
                    writeExclusion( o, "exclusion", serializer );
                }
                serializer.endTag( NAMESPACE, "exclusions" );
            }
            if ( dependency.getOptional() != null )
View Full Code Here

                    for ( Dependency dep : dependencies )
                    {
                        if ( dep.getArtifactId().equals( n2.getArtifact().getArtifactId() )
                            && dep.getGroupId().equals( n2.getArtifact().getGroupId() ) )
                        {
                            Exclusion exclusion = new Exclusion();
                            exclusion.setArtifactId( n3.getArtifact().getArtifactId() );
                            exclusion.setGroupId( n3.getArtifact().getGroupId() );
                            dep.addExclusion( exclusion );
                            modified = true;
                            break;
                        }
                    }
View Full Code Here

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

            }

            List exclusions = new ArrayList();
            for ( Iterator j = dependency.getExclusions().iterator(); j.hasNext(); )
            {
                Exclusion e = (Exclusion) j.next();
                exclusions.add( e.getGroupId() + ":" + e.getArtifactId() ); //$NON-NLS-1$
            }

            ArtifactFilter newFilter = new ExcludesArtifactFilter( exclusions );

            art.setDependencyFilter( newFilter );
View Full Code Here

        Iterator<Exclusion> aI = a.iterator();
        Iterator<Exclusion> bI = b.iterator();

        while ( aI.hasNext() )
        {
            Exclusion aD = aI.next();
            Exclusion bD = bI.next();

            boolean r = eq( aD.getGroupId(), bD.getGroupId() ) //
                && eq( aD.getArtifactId(), bD.getArtifactId() );

            if ( !r )
            {
                return false;
            }
View Full Code Here

            {
                List<Exclusion> src = source.getExclusions();

                for ( Exclusion element : src )
                {
                    Exclusion clone = element.clone();
                    target.addExclusion( clone );
                }
            }
        }
View Full Code Here

     */
    private void handleExclusions(Artifact artifact, Dependency dependency) {

        List exclusions = new ArrayList();
        for (Iterator j = dependency.getExclusions().iterator(); j.hasNext(); ) {
            Exclusion e = (Exclusion) j.next();
            exclusions.add(e.getGroupId() + ":" + e.getArtifactId()); //$NON-NLS-1$
        }

        ArtifactFilter newFilter = new ExcludesArtifactFilter(exclusions);

        artifact.setDependencyFilter(newFilter);
View Full Code Here

TOP

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

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.