Changes in Core, Doesn't reflect in modules

Hi, I’m doing some changes in both core (Added a new ‘unknown’ attribute to the Person class) and in the Registrationapp as well. In my RegistrationApp module, i’m setting the value of that ‘unknown’ attribute of Person. But as obvious. the setter is not available in my registrationApp as it resolves the dependency from maven’s repo, which doesn’t include an unknown attribute. So i thought of building my core and adding the output as a library in my RegistrationApp. But it output a war where as i need a jar to include it as a library.

Summary - I can’t build my registrationApp since changes done in core are not resolving here.

P.S. - I really do feel like there has to be more convenient way to achieve this. It should be an often case where you make changes in core and use them in any other module. So, how stupid am i ? :slight_smile:

Thanks in advance.


In your module pom.xml you need to reference a snapshot version of core like 2.1.0-SNAPSHOT. For that I suggest you delete the current snapshot version already in your local maven repo and install the one with your changes using

mvn clean install

from the root directory of openmrs core. I believe with that the snapshot version stored in your local repo will be the one with your changes instead of the one from maven central.

1 Like

Is there a ticket requiring this addition? Is it a person attribute or a new property on the Person class?

1 Like

@ivange94, Thanks, I’ll give it a try. @wyclif, It’s for my GSoC project. I’ve to move the unknown patient registration functionality to the core. I’m passing the unknown status as a Property in the Person class. But marked it as @Transient to prevent from being persisted to the database. Am i going the wrong way?


I see, why don’t you want it to be persisted to the DB if you are adding it anyways, where do you intend to store it?

To resolve your classpath issues, you need to build core with your changes and make sure it updates the maven repo with your new artifacts, and make sure the version of the OpenMRS dependency in your module’s pom file matches that in your branch for core.

1 Like

@wyclif, Sorry for the late response. Btw, i don’t want to store it since i just want to check if the patient that is trying to be registered is at unknown status. If so, i am setting some properties on it. But if i were to pass the unknown status to the core without adding it as a property in the Person class, i will have to overload the registration methods which will introduce a mess in return. Let me post some links to the changes here. (will do soon).

What can’t you just use some sort of session or thread scoped variable instead of adding a transient field?