Hi All,
For a long time I have been unable to run individual context-sensitive tests in my Mirebalais project (and various others) from within IntelliJ. The error is failure to load the application context caused by "No bean named 'emrOrderService' is defined". (It works fine to run a maven build.)
I finally looked into this and figure out the reason. I'm expecting to load this bean from the emrapi module:
@Component(value = "emrOrderService")
@OpenmrsProfile(openmrsVersion = "1.9.*")
public class DefaultOrderServiceImpl implements EmrOrderService
But when checking whether the bean should be loaded (OpenmrsProfileExcludeFilter and OpenmrsProfileIncludeFilter) the value of OpenmrsConstants.OPENMRS_VERSION_SHORT is this:
${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-${revisionNumber}
I guess that since maven filtering hasn't happened, the following definition in OpenmrsConstants.java doesn't work right:
public static final String OPENMRS_VERSION_SHORT = THIS_PACKAGE.getSpecificationVersion() != null ? THIS_PACKAGE
.getSpecificationVersion() : (getBuildVersionShort() != null ? getBuildVersionShort() : getVersion());
Can anyone think of a workaround for this?
-Darius