Package org.apache.maven.artifact.versioning

Examples of org.apache.maven.artifact.versioning.DefaultArtifactVersion.compareTo()


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

        // release 1.0.2 is the first known good release
        if (version.compareTo(new DefaultArtifactVersion("1.0.2")) < 0) {
            return false;
        }

        return true;
   
View Full Code Here


            {
                Artifact oldArtifact = compileArtifactMap.get( newArtifact.getDependencyConflictId() );

                ArtifactVersion oldVersion = new DefaultArtifactVersion( oldArtifact.getVersion() );
                ArtifactVersion newVersion = new DefaultArtifactVersion( newArtifact.getVersion() );
                if ( newVersion.compareTo( oldVersion ) > 0 )
                {
                    compileArtifactMap.put( newArtifact.getDependencyConflictId(), newArtifact );
                }
            }
            else
View Full Code Here

            {
                Artifact oldArtifact = compileArtifactMap.get( newArtifact.getDependencyConflictId() );

                ArtifactVersion oldVersion = new DefaultArtifactVersion( oldArtifact.getVersion() );
                ArtifactVersion newVersion = new DefaultArtifactVersion( newArtifact.getVersion() );
                if ( newVersion.compareTo( oldVersion ) > 0 )
                {
                    compileArtifactMap.put( newArtifact.getDependencyConflictId(), newArtifact );
                }
            }
            else
View Full Code Here

        try {
            List<ArtifactVersion> artifactVersions = artifactMetadataSource
                    .retrieveAvailableVersions(projectArtifact, localRepository,
                            project.getRemoteArtifactRepositories());
            for (ArtifactVersion version : artifactVersions) {
                if (SNAPSHOT_PATTERN.matcher(version.toString()).find() || projectVersion.compareTo(version) <= 0) {
                    continue;
                }
                if (latest == null || latest.compareTo(version) < 0) {
                    latest = version;
                }
View Full Code Here

        try {
            List<ArtifactVersion> artifactVersions = artifactMetadataSource
                    .retrieveAvailableVersions(projectArtifact, localRepository,
                            project.getRemoteArtifactRepositories());
            for (ArtifactVersion version : artifactVersions) {
                if (SNAPSHOT_PATTERN.matcher(version.toString()).find() || projectVersion.compareTo(version) <= 0) {
                    continue;
                }
                if (latest == null || latest.compareTo(version) < 0) {
                    latest = version;
                }
View Full Code Here

            {
                Artifact oldArtifact = compileArtifactMap.get( newArtifact.getDependencyConflictId() );

                ArtifactVersion oldVersion = new DefaultArtifactVersion( oldArtifact.getVersion() );
                ArtifactVersion newVersion = new DefaultArtifactVersion( newArtifact.getVersion() );
                if ( newVersion.compareTo( oldVersion ) > 0 )
                {
                    compileArtifactMap.put( newArtifact.getDependencyConflictId(), newArtifact );
                }
            }
            else
View Full Code Here

        {
            String mojoGwtVersion = properties.getProperty( "gwt.version" );
            //ComparableVersion with an up2date maven version
            ArtifactVersion mojoGwtArtifactVersion = new DefaultArtifactVersion( mojoGwtVersion );
            ArtifactVersion userGwtArtifactVersion = new DefaultArtifactVersion( gwtUser.getVersion() );
            if ( userGwtArtifactVersion.compareTo( mojoGwtArtifactVersion ) < 0 )
            {
                getLog().warn( "Your project declares dependency on gwt-user " + gwtUser.getVersion()
                                   + ". This plugin is designed for at least gwt version " + mojoGwtVersion );
            }
        }
View Full Code Here

        try {
            List<ArtifactVersion> artifactVersions = artifactMetadataSource
                    .retrieveAvailableVersions(projectArtifact, localRepository,
                            project.getRemoteArtifactRepositories());
            for (ArtifactVersion version : artifactVersions) {
                if (SNAPSHOT_PATTERN.matcher(version.toString()).find() || projectVersion.compareTo(version) <= 0) {
                    continue;
                }
                if (latest == null || latest.compareTo(version) < 0) {
                    latest = version;
                }
View Full Code Here

            {
                Artifact oldArtifact = compileArtifactMap.get( newArtifact.getDependencyConflictId() );

                ArtifactVersion oldVersion = new DefaultArtifactVersion( oldArtifact.getVersion() );
                ArtifactVersion newVersion = new DefaultArtifactVersion( newArtifact.getVersion() );
                if ( newVersion.compareTo( oldVersion ) > 0 )
                {
                    compileArtifactMap.put( newArtifact.getDependencyConflictId(), newArtifact );
                }
            }
            else
View Full Code Here

            {
                Artifact oldArtifact = compileArtifactMap.get( newArtifact.getDependencyConflictId() );

                ArtifactVersion oldVersion = new DefaultArtifactVersion( oldArtifact.getVersion() );
                ArtifactVersion newVersion = new DefaultArtifactVersion( newArtifact.getVersion() );
                if ( newVersion.compareTo( oldVersion ) > 0 )
                {
                    compileArtifactMap.put( newArtifact.getDependencyConflictId(), newArtifact );
                }
            }
            else
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.