Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3644

Define which resources to load for module based on OpenMRS version

    XMLWordPrintable

    Details

      Description

      MDS provides support for different versions of OpenMRS within a single module. It is achieved thanks to splitting module's API into jars: mds-api-common.jar, mds-api-1.7.jar, mds-api-1.9.jar. Currently all jars are put on the classpath, even if all we need on OpenMRS 1.6 is mds-api-common.jar. A module developer must be really careful to prevent using any classes from mds-api-1.7.jar or mds-api-1.9.jar on OpenMRS 1.6. In order to make it easier to structure modules this way, I propose to provide a new tag in config.xml:

      <conditionalResources>
        <resource>
          <path>lib/mds-api-common.jar</path>
          <omrsVersion>[1.6)</omrsVersion>
        </resource>
        <resource>
          <path>lib/mds-api-1.7.jar</path>
          <omrsVersion>[1.7)</omrsVersion>
        </resource>
        <resource>
          <path>lib/mds-api-1.9.jar</path>
          <omrsVersion>[1.9)</omrsVersion>
        </resource>
      </conditionalResources>
      

      Such a declaration would result in loading:
      mds-api-common.jar on OMRS 1.6,
      mds-api-common.jar and mds-api-1.7.jar on OMRS 1.7 and 1.8
      mds-api-common.jar, mds-api-1.7.jar and mds-api-1.9.jar on OMRS 1.9

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                raff Rafal Korytkowski
                Reporter:
                raff Rafal Korytkowski
                Votes:
                0 Vote for this issue
                Watchers:
                13 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 day Original Estimate - 1 day
                    1d
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 2 days
                    2d