public String getArtifactLastVersion ( final String gavc ) { final List < String > versions = getArtifactVersions ( gavc ) ; final VersionsHandler versionHandler = new VersionsHandler ( repositoryHandler ) ; final String viaCompare = versionHandler . getLastVersion ( versions ) ; if ( viaCompare != null ) { return viaCompare ; } // // These versions cannot be compared // Let's use the Collection.max() method by default, so goingo for a fallback // mechanism. // LOG . info ( "The versions cannot be compared" ) ; return Collections . max ( versions ) ; }
Returns the last available version of an artifact