SDK fails with "Invalid server platform version"?

I’m trying to do something pretty standard with the SDK (that I’m pretty sure I’ve done before) and it failed confusingly.

I did setup for a new server with platform version 2.0.4.1. Then I did mvn openmrs-sdk:run -e and I got the error:

[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.8.1:run-tomcat (default-cli) on project standalone-pom: Invalid server platform version: 2.0.4.1 → [Help 1] … Caused by: org.apache.maven.plugin.MojoExecutionException: Invalid server platform version: 2.0.4.1 at org.openmrs.maven.plugins.RunTomcat.execute(RunTomcat.java:114)

Looking at the SDK code it seems like the SDK thinks this is neither a 1.x or 2.x platform line.

Has anyone seen this before?

(Could it be that it doesn’t handle version numbers with 4 components?)

EDIT: looking at https://github.com/apache/maven/blob/master/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java it appears this doesn’t support our 2.0.4.1 version number. In other words you can’t run the latest OpenMRS platform release via the SDK, as far as I can tell.

I somehow felt using “2.0.4.1” was not right. The version is not compliant with maven versioning scheme explained at https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning Effectively Maven treats the version as a plain string and any version comparison will be done using an alphabetic order, which may lead to strange results.

I feel we should release 2.0.5 as we may see other issues with that going forward.

Agreed. Move on to 2.0.5 and do everything we can to pretend that 2.0.4.1 never existed.

@raff, do you want to release 2.0.5 (in order to get your head around the platform release process, and start improving it)? :slight_smile:

Sure, I’ll do that :slight_smile: