@@ -786,9 +786,13 @@ private Map<String, String> getO3VersionsOptionsMap(VersionsHelper versionsHelpe
786
786
Map <String , String > optionsMap = new LinkedHashMap <>();
787
787
788
788
{
789
- Artifact artifact = new Artifact ("distro-emr-configuration" , "3.0.0-SNAPSHOT" , "org.openmrs" , "zip" );
790
- for (ArtifactVersion version : versionsHelper .getAllVersions (artifact , MAX_OPTIONS_SIZE )) {
791
- optionsMap .put (String .format (optionTemplate , version .toString ()), artifact .getGroupId () + ":" + artifact .getArtifactId () + ":" + version );
789
+ Artifact artifact = new Artifact ("distro-emr-configuration" , "3.0.0-beta.21" , "org.openmrs" , "zip" );
790
+ List <ArtifactVersion > versionList = versionsHelper .getAllVersions (artifact , MAX_OPTIONS_SIZE );
791
+ for (ArtifactVersion version : versionList ) {
792
+ if (optionsMap .size () < MAX_OPTIONS_SIZE ) {
793
+ optionsMap .put (String .format (optionTemplate , version .toString ()),
794
+ artifact .getGroupId () + ":" + artifact .getArtifactId () + ":" + version );
795
+ }
792
796
}
793
797
}
794
798
@@ -797,10 +801,15 @@ private Map<String, String> getO3VersionsOptionsMap(VersionsHelper versionsHelpe
797
801
}
798
802
799
803
{
800
- Artifact artifact = new Artifact ("referenceapplication-distro" , "3.0.0-SNAPSHOT" , "org.openmrs.distro" , "zip" );
801
- for (ArtifactVersion version : versionsHelper .getAllVersions (artifact , MAX_OPTIONS_SIZE )) {
802
- optionsMap .put (String .format (optionTemplate , version .toString ()), artifact .getGroupId () + ":" + artifact .getArtifactId () + ":" + version );
803
-
804
+ Artifact artifact = new Artifact ("referenceapplication-distro" , "3.0.0-beta.21" , "org.openmrs.distro" , "zip" );
805
+ List <ArtifactVersion > versionList = versionsHelper .getAllVersions (artifact , MAX_OPTIONS_SIZE );
806
+ for (ArtifactVersion version : versionList ) {
807
+ if (optionsMap .size () < MAX_OPTIONS_SIZE ) {
808
+ optionsMap .put (String .format (optionTemplate , version .toString ()),
809
+ artifact .getGroupId () + ":" + artifact .getArtifactId () + ":" + version );
810
+ } else {
811
+ break ;
812
+ }
804
813
}
805
814
}
806
815
0 commit comments