Skip to content

Commit

Permalink
SDK-354 - follow-up fix for O3 distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
mseaton committed Nov 15, 2024
1 parent df5ceb2 commit 1f1c552
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ private Map<String, String> getO3VersionsOptionsMap(VersionsHelper versionsHelpe
Map<String, String> optionsMap = new LinkedHashMap<>();

{
Artifact artifact = new Artifact("distro-emr-configuration", "3.0.0", "org.openmrs", "zip");
Artifact artifact = new Artifact(SDKConstants.REFAPP_DISTRO_EMR_CONFIGURATION, "3.0.0", "org.openmrs", "zip");
for (ArtifactVersion version : versionsHelper.getAllVersions(artifact, MAX_OPTIONS_SIZE)) {
optionsMap.put(String.format(optionTemplate, version.toString()), artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + version);
}
Expand All @@ -801,7 +801,7 @@ private Map<String, String> getO3VersionsOptionsMap(VersionsHelper versionsHelpe
}

{
Artifact artifact = new Artifact("referenceapplication-distro", "3.0.0", "org.openmrs.distro", "zip");
Artifact artifact = new Artifact(SDKConstants.REFAPP_DISTRO, "3.0.0", "org.openmrs.distro", "zip");
for (ArtifactVersion version : versionsHelper.getAllVersions(artifact, MAX_OPTIONS_SIZE)) {
if (!version.toString().endsWith("-SNAPSHOT") && optionsMap.size() < MAX_OPTIONS_SIZE) {
optionsMap.put(String.format(optionTemplate, version),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,8 @@ public Properties getFrontendProperties(Server server) throws MojoExecutionExcep
}

public Properties getFrontendPropertiesForServer(Artifact artifact, File directory) throws MojoExecutionException {
if (artifact.getArtifactId().equals("referenceapplication-distro")) {
String artifactId = artifact.getArtifactId();
if (artifactId.equals(SDKConstants.REFAPP_DISTRO) || artifactId.equals(SDKConstants.REFAPP_DISTRO_EMR_CONFIGURATION)) {
if (new Version(artifact.getVersion()).higher(new Version("3.0.0-beta.16"))) {
return getFrontendProperties(artifact, directory);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ public class SDKConstants {
public static final List<String> SUPPPORTED_REFAPP_VERSIONS_2_3_1_OR_LOWER = java.util.Arrays.asList("2.3.1", "2.2", "2.1");
private final static String[] SUPPORTED_MODULE_EXTENSIONS = new String[]{Artifact.TYPE_WAR, Artifact.TYPE_JAR, Artifact.TYPE_OMOD};

public static final String REFAPP_DISTRO = "referenceapplication-distro";
public static final String REFAPP_DISTRO_EMR_CONFIGURATION = "distro-emr-configuration";

// version keywords
public static final String LATEST_VERSION_BATCH_KEYWORD = "LATEST";
public static final String LATEST_SNAPSHOT_BATCH_KEYWORD = "LATEST-SNAPSHOT";
Expand Down

0 comments on commit 1f1c552

Please sign in to comment.