I can’t build the reference application module anymore and I really don’t know what happened.
I tried to build on tags referenceapplication-2.2, referenceapplication-2.3 and on master but none works. Always got the same errors:
Tests in error:
testSetupOfProcessHL7Task(org.openmrs.module.referenceapplication.ReferenceApplicationActivatorComponentTest): Failed to load ApplicationContext
testAddLoginLocationTagToAtleastOneLocationIfThereAreNoLoginLocations(org.openmrs.module.referenceapplication.ReferenceApplicationActivatorComponentTest): Failed to load ApplicationContext
testAddLoginLocationTagToUnknownLocationIfThereAreNoLoginLocations(org.openmrs.module.referenceapplication.ReferenceApplicationActivatorComponentTest): Failed to load ApplicationContext
testSetUpAdtGlobalProperties(org.openmrs.module.referenceapplication.ReferenceApplicationActivatorComponentTest): Failed to load ApplicationContext
Same here, I just cloned it again and mvn install-ed it on a fresh ~/.m2 and it fails on the tests:
Tests in error:
testSetupOfProcessHL7Task(org.openmrs.module.referenceapplication.ReferenceApplicationActivatorComponentTest): Failed to load ApplicationContext
testAddLoginLocationTagToAtleastOneLocationIfThereAreNoLoginLocations(org.openmrs.module.referenceapplication.ReferenceApplicationActivatorComponentTest): Failed to load ApplicationContext
testAddLoginLocationTagToUnknownLocationIfThereAreNoLoginLocations(org.openmrs.module.referenceapplication.ReferenceApplicationActivatorComponentTest): Failed to load ApplicationContext
testSetUpAdtGlobalProperties(org.openmrs.module.referenceapplication.ReferenceApplicationActivatorComponentTest): Failed to load ApplicationContext
Now again I can’t build the referenceapplication module on master:
/tmp/openmrs-module-referenceapplication/api/src/main/java/org/openmrs/module/referenceapplication/ReferenceApplicationActivator.java:[30,32] error: package org.openmrs.module.emrapi does not exist
@raff, something that I find a little ‘scary’ here is that suddenly we cannot build projects that were building fine just moments ago. And this without changing anything at all on our end, in particular: not even pulling from any remotes.
Surely that should not be the case right?
In a hurry and as a temporary workaround we figured out that when pointing to 2.3 for the distro refapp and 1.12-SNAPSHOT for emrapi-api-1.11, then we could build the refapp module (although while skipping tests).
Shame on me for not checking our CI before the weekend. I’ve fixed it now.
If you setup your project to use any SNAPSHOT dependency then maven will automatically check for updates once in awhile when building. You have no guarantee that your project will continue to build even if you do not make any changes yourself, because they may come from any SNAPSHOT dependency. To avoid that you could either do not depend on SNAPSHOTs or use the -o switch when running maven, which stands for offline.
That said we try to keep our builds green so that you are safe to depend on SNAPSHOTs and we appreciate anyone depending on SNAPSHOTs as it gives us instant feedback if anything fails. We will do our best to address any issues as soon as possible.
Right… I thought that this kind of risk was only with LATEST dependencies, but obviously this also happens with SNAPSHOT ones, as we definitely experienced it
Thanks for the -o tip, I didn’t know that. That is very useful to know.
Most of all thanks for fixing the issue and pledging that we should be able to use SNAPSHOT dependencies in the future.
And I can confirm that it is working again now!