Examples of DefaultArtifactVersion


Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

            // TODO: this is a workaround for a bug in DefaultArtifactVersion - fix there - it should not consider case in comparing the qualifier
            // NOTE: The combination of upper-casing and lower-casing is an approximation of String.equalsIgnoreCase()
            String thisVersion = strVersion.toUpperCase( Locale.ENGLISH ).toLowerCase( Locale.ENGLISH );
            String thatVersion = that.strVersion.toUpperCase( Locale.ENGLISH ).toLowerCase( Locale.ENGLISH );

            result = new DefaultArtifactVersion( thisVersion ).compareTo( new DefaultArtifactVersion( thatVersion ) );
        }
        return result;
    }
View Full Code Here

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

            List metadataVersions = repoMetadata.getVersioning().getVersions();
            versions = new ArrayList( metadataVersions.size() );
            for ( Iterator i = metadataVersions.iterator(); i.hasNext(); )
            {
                String version = (String) i.next();
                versions.add( new DefaultArtifactVersion( version ) );
            }
        }
        else
        {
            versions = Collections.EMPTY_LIST;
View Full Code Here

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

                if ( !groupId.equals( archetype.getGroupId() ) || !artifactId.equals( archetype.getArtifactId() ) )
                {
                    continue;
                }

                ArtifactVersion version = new DefaultArtifactVersion( archetype.getVersion() );

                // don't override the first catalog containing a defined version of the artifact
                if ( !archetypeVersionsMap.containsKey( version ) )
                {
                    archetypeVersionsMap.put( version, archetype );
View Full Code Here

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

        }

        Artifact testNgArtifact = getTestNgArtifact();
        if ( testNgArtifact != null){

            DefaultArtifactVersion defaultArtifactVersion = new DefaultArtifactVersion( testNgArtifact.getVersion() );
            getProperties().setProperty( "testng.configurator", getConfiguratorName( defaultArtifactVersion ) );
        }


    }
View Full Code Here

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

        Artifact artifact = getProjectArtifactMap().get( getTestNGArtifactName() );

        if ( artifact != null )
        {
            VersionRange range = createVersionRange();
            if ( !range.containsVersion( new DefaultArtifactVersion( artifact.getVersion() ) ) )
            {
                throw new MojoExecutionException(
                    "TestNG support requires version 4.7 or above. You have declared version "
                        + artifact.getVersion() );
            }
View Full Code Here

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

        if ( this.testNgVersion != null )
        {
            goals1.add( "-DtestNgVersion=" + testNgVersion );

            ArtifactVersion v = new DefaultArtifactVersion( testNgVersion );
            try
            {
                if ( VersionRange.createFromVersionSpec( "(,5.12.1)" ).containsVersion( v ) )
                {
                    goals1.add( "-DtestNgClassifier=jdk15" );
View Full Code Here

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

        List<ArtifactVersion> artifactVersions = new ArrayList<ArtifactVersion>( versions.size() );

        for ( String version : versions )
        {
            artifactVersions.add( new DefaultArtifactVersion( version ) );
        }

        return artifactVersions;
    }
View Full Code Here

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

    @Override
    public int compare( ArtifactMetadata o1, ArtifactMetadata o2 )
    {
        // sort by version (reverse), then ID
        int result =
            new DefaultArtifactVersion( o2.getVersion() ).compareTo( new DefaultArtifactVersion( o1.getVersion() ) );
        return result != 0 ? result : o1.getId().compareTo( o2.getId() );
    }
View Full Code Here

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

        List<ArtifactVersion> artifactVersions = new ArrayList<ArtifactVersion>( versions.size() );

        for ( String version : versions )
        {
            artifactVersions.add( new DefaultArtifactVersion( version ) );
        }

        return artifactVersions;
    }
View Full Code Here

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion

            {
                try
                {
                    result =
                        AbstractVersionEnforcer.containsVersion( VersionRange.createFromVersionSpec( pattern[2] ),
                                                                 new DefaultArtifactVersion( artifact.getBaseVersion() ) );
                }
                catch ( InvalidVersionSpecificationException e )
                {
                    throw new EnforcerRuleException( "Invalid Version Range: ", e );
                }
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.