Problem with SDK tmp directory?

I ran into a problem today with the SDK where the “tmp” directory didn’t appear to be properly updated after I updated the OpenMRS Platform.

Basically, what I did was I added a couple new dependencies to the main OpenMRS Platform pom and then did a “mvn openmrs-sdk:run”. I was watching openmrs-core, and so the “openmrs-sdk:run” build openmrs-core and I confirmed that the new war it dropped into the ~/openmrs/[server-id] directory did include the 2 new jar dependencies I had included.

However, things still weren’t working, and it looked like those two new jars weren’t on the classpath. Digging deeper I discovered that the two new dependencies were not included in:

./openrs/[serverId]/tmp/work/Tomcat/localhost/openmrs/loader/META-INF/maven/org.openmrs.api/openmrs-api/pom.xml

I’m assuming this was my problem… I’ve cleared out the tmp directory and am restarting now.

Just wondered if there was something I was supposed to do to clear out the tmp directory, or if this is a bug?

Thanks and take care! Mark

@raff do you have any off the head response to this? :slight_smile:

Thanks @dkayiwa for digging it out for me :slight_smile:

Yes, it seems to be a bug. https://github.com/openmrs/openmrs-sdk/blame/master/maven-plugin/src/main/java/org/openmrs/maven/plugins/Deploy.java#L308 deletes the tmp directory when deploying the war. We may have missed to do the same when calling the run command.

Created https://issues.openmrs.org/browse/SDK-228